The 'save_post'
action was added to core in 2.0, and has always been an action. Looking through the current autosave procedures, it doesn’t appear to call the 'save_post'
action directly at any time.
So the short answer is, no. There is no reason, and has never been any reason, to return any value on this action. Of course, it doesn’t hurt at all to do return the post id.
Related Posts:
- Return $post_id when DOING_AUTOSAVE?
- source code: WP_INSTALLING vs. WP_SETUP_CONFIG in setup-config.php
- How do I reset my footer.php to its original state? (theme: Origami)
- How to insert integration code for CRM?
- Best collection of code for your .htaccess file [closed]
- Why does save_post action fire when creating a new post?
- what is correct way to hook when update post
- Add validation and error handling when saving custom fields?
- How can I edit post data before it is saved?
- add_action(), add_filter() before or after function
- How to create an API for my plugin?
- Is there a action hook for the “Empty Trash” button?
- How to change “Draft” string for status of custom post type to “Unavailable”?
- trigger save_post event programmatically
- Unable to prevent function using save_post firing twice
- Cron jobs in a class
- How to force function to run as the last one when saving the post?
- Custom post type save_post action not firing
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- Which to use to execute code during the saving of a plugin settings page?
- Prevent Deletion of Blogs
- Including Angle Brackets In Pre Sections
- A Post is saved twice or more during add_action(save_post)
- Is there an action/filter called when WP_Query->query is finished and assigns posts
- How can I limit functionality in one version of a plugin?
- Why can’t I hook into save_posts after admin_init?
- Action ‘save_post’ not working for quick edit
- Manipulating post meta in the customizer
- Anchor Text code string is automatically modified by WordPress
- Check before publishing, if already exist post with current custom field value
- WordPress is converting & to & inbetween [code] brackets
- prevent post submission
- Print shortcode in custom action hook not where the shortcode is entered
- Get the post_id of a new post
- Can a plugin add to header/footer/body content?
- Disable email field on WooCommerce customer account details
- Exclude trash from save_post
- Notice: Undefined property: wpdb::$current_post What can be wrong?
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- Get updated post meta on save_post action?
- update_post_meta() whenever custom post type is updated
- Where to save common libraries?
- Replacing the default content created while the site creation
- How can I add data to a custom column in the Users section of the wordpress backend?
- How to get Custom Post ID by adding filter to child theme’s function
- What’s the best action to use when you want to do something only once per theme setup?
- Check Title Unique Or Not and If not error message and dont save
- How to trigger function on theme delete?
- Sublime Video: Playlist which gets all attached videos
- Code Friendly Block Quotes
- Remove line breaks from ?
- Get post id in wordpress action?
- How to get multiple Action Hooks in an Array
- How to fix a “globals” issue to avoid a rejected theme?
- How would go about if I just want a temporary function?
- Need resource on available functions and objects
- WordPress wp_insert_post() returns 0 but not not wp_error
- Call add_action() in function wordpress
- I want to remove the home page header image from all other pages
- Set default Custom Post Meta Value
- Hide wordpress field if data is empty in post!
- Adding custom styles to dropdown in editor
- Write automatic title at save_post (infinite loop)
- Add meta field after post has been published
- Hooking into the init action will fire it too frequently?
- How does WordPress determine which multisite the user is on from the URL?
- Unhook a function within a class in the child theme
- Table styles disappear when updating content
- Manage recurring event time
- wp_editor save all content
- save_post affect creation and deletion
- Link two different post using there post_id in post meta
- Check get_post value after wp-admin login
- preg_replace style attr in $content and Editing post_content before saving
- Add two or multiple functions in WordPress Post or Page
- Need an elegant solution to declare the value of two variables based on the count of the post
- How to implement custom Javascript to my site
- Am I using an action hook correctly?
- Hook To Get All Posts Deleted
- WordPress save_post hook not firing when checking if _GET[‘post’] is set
- Pull ‘Popular Posts’ within specific timeframe
- A good way to include snippets of code in both posts, pages and Event Manager Template files?
- save_post action not firing when save
- Anchor Text code string is automatically modified by WordPress
- save post running twice and creating two database entries – how do I disable this?
- Problem with executing a function on saving a post
- Redirect back to origin page after using get_delete_post_link()
- Changes in code only show after changing theme
- Custom post type functions.php if statement on action
- How wordpress plugin hooks works? [duplicate]
- Code Highlighting in BlockQuote
- feed url problem
- Add variable : 1 Week ago
- Where do I go to add a tag before the closing body tag?
- Changes to code not displaying
- Developing an IP lookup function using an API
- How do I set a custom post type Category after import using wp_set_post_terms
- A way to see real changes of posts inside an action?
- Embedding a custom live chat (gen. from Salesforce) into my WordPress header
- Add custom css to specific user