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?
- How to modify the action attribute of the wp-login.php?action=register form?
- Proper implementation/use of code/syntax highlighting
- adding multiple custom columns to users.php
- Plugin with action ‘save_post’ needs to press publish twice on order to publish
- Adding custom field in all widgets, but at the top of the form, in admin area
- Adding custom fields to bbpress reply form
- How to remove all comments from JS, HTML, CSS files?
- Adding buttons to Add New Post and Add New Page
- What data validation we must use in different contexts?
- Modify custom field input data before creating a new post
- Proper after_setup_theme and wp_head cleanup
- Need To Post Unformated Code
- Sidebar login: How do I get the username to show after “Welcome”?
- Clear cache on post of one type when something happens to post of other type
- Tips for managing code when developing a parent theme framework
- Bug: Post needs to be updated twice when adding action for save_post hook
- How to manage multiple wordpress project with shared code base
- save_post action doesn’t passing post id to my function as argument
- a weird attribute on every html tag
- Create post revision on slug change
- Change order of custom submenu link in WP Admin?
- WordPress 4.9.8 doesn’t save if content has style=”
- How to cancel an action hooked to untrash_post? or any hook
- Hide post title input for all roles except admin
- Block IP Addresses using Code [closed]
- Plugin Development – Functions or Hooks?
- Why does my delete_post hook get called twice
- Can’t Get Metabox Data Saved Assistance Needed
- Returning or use form data using a hook?
- How to stop displaying the Id without losing the functionality
- What do the numbers mean at the end of add_action(‘save_post’)…?
- Find Total Authors
- Why does HTML entities are still encoded in Code Block?
- How to create a checkbox to show/hide a field in WooCommerce checkout [closed]