add below action in your main function file of your plugin
add_action( 'wp_insert_post', 'my_project_updated_post', 10, 3 );
function my_project_updated_post( $post_id, $post, $update ) {
// your code goes here
// Every time you will get updated or newly created post id here.
}
Related Posts:
- Is get_option() faster than accessing get_transient()?
- Best practices for using the transients API
- Trouble with Transient API when W3TC is activated [closed]
- How to make dynamically-generated content searchable in WordPress?
- How can I free up the memory used by update_post_meta?
- How can I render shortcode so that its not cached by Caching plugins?
- Does WordPress’s HTTP API use any caching?
- Will cron job run if page loaded is being served from cache?
- Is using WP Transients to save external data for a plugin the best/right way?
- Cache directory needed for plugin
- Clearing cached plugin data if it is using an external object cache
- Make WordPress cache permanent for some pages until edited
- Will setcookie work if there is a cache plugin installed?
- Maximum lifetime for nonce
- Clearing caches on plugin uninstall
- How to implement filesystem cache in WordPress
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Caching the_content calls
- Service Worker Uncaught (in promise) DOMException
- Should I use wp-content/cache or [PLUGIN_DIR]/cache?
- I need to refresh page to display wp_get_current_user() : why?
- Undefined cache functions in my custom plugin
- Is it possible to restore an expired transient?
- Plugin files not updated (cache cleared)
- Does WP REST API cache internally executed (rest_do_request) requests?
- Is there any plugin development framework
- Plugin – create a page without it appearing in the side menu
- Is wp-content/install.php a Drop-in?
- Handling results from data hooked into admin_post
- Using wp_filesystem in Plugins
- How to write testable classes in WordPress
- get_template_part from plugin
- Edit or Remove Plugin .htaccess Using The Admin Panel
- WordPress scheduled task is called but not executed
- How to create collections that are edited in admin?
- How can i list current author’s categories?
- How can I call “preview post” from wp_remote_get with authentication?
- When is it too late to call the action wp_enqueue_scripts?
- Use js script from one plugin in another plugin
- Rest Api How to get results of child categories with one api call
- Plugin Loading Scripts and Styles on Every Page – Even when not being used
- Build dynamic page from cURL (HTML page) response with plugin
- How to store accumulate multiple option values in a single array using Options_API
- template_redirect for single posts w/ custom fields
- can I prevent WP users (even admin) from deleting custom categories?
- How to deal with equal & similar arguments for a function?
- What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?
- How do I obtain a list of categories assigned to the current post?
- Modify hard-coded conditionals for roles to custom roles
- need to get user ID after a user logs in
- Callback is not called in add_settings_field() when passed as part of an array, but recognises that it’s there. It’s passed Class to Class using OOP
- Plugin translations not installed but… strings are translated!
- Secure Pages Best Practice
- Does wp_login only trigger before an user signs in into the admin panel?
- How to access noticeOperations from withNotices
- Putting a resized image into media library with wp_get_image_editor(
- Using ReactJS in the WordPress admin for plugin development
- How to use github to update my plugin
- On the .org repo, can your plugin name/slug contain “WooCommerce” [closed]
- Wrap text around shortcode
- UWooCommerce – add cart discount programmatically?
- Checked() function on a multidimensional array
- Remove sidebar on single page using plugin API
- When does save_post hook fire on post save/update
- Plugin does not add action
- Enqueuing scripts and styles in custom plugins
- Include file in plugin file
- Plugin language always shows WP site language, not profile language
- Adding custom stylesheet into header.php using a plugin
- Developing the save function in Gutenberg blocks
- Creating an installation zip file
- update_callback is not working in register_rest_field
- How to create ShortCode
- Detect change in site_url and home_url
- Reporting errors in a shortcode plugin
- Add a custom menu item that supports wildcards
- jQuery UI tab does not work in the plugin page
- Using HTML links within translatable string
- How to share user data across multiple WordPress websites?
- Load stylesheet in edit category page?
- How to properly create table in plugin
- Error code when migrate
- Add two button to page and post admin to redirect to : add new & list of (posts – pages) just after saving post or page
- How to add .ini file type to the plugin editor to read and edit?
- WordPress: I wanted to use Add rewrite rule multiple times for multiple CPT in my plugin
- WordPress Ajax not returning Response
- Group By in a Metaquery
- Add a Script button in W3 Total Cache plugin not working due to conflicting jQuery version
- Remove from a div by class name from post page if post author role is not administrator
- Getting duplicate page when activating my plugin
- Enqueue script not working
- Modify request query string before plugins
- auto create only 1 wp page in activate custom plugin
- Include add_post_meta in a plugin
- isset($_POST[‘submit’]) ignored on comment submission
- how to insert content into wp_head after loop_end
- Remove Gutenberg Buttons Block
- How to detect when the user clicks the publish/update button in Gutenberg Editor
- Is It Possible to Use the Block Editor’s Notification Feature to Send Another Notification After the Post Is Saved?
- Can we write custom DOM manipulation inside edit.js file while developing custom Gutenberg block?