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?
- 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?
- How to change “Draft” string for status of custom post type to “Unavailable”?
- Unable to prevent function using save_post firing twice
- Cron jobs in a class
- Custom post type save_post action not firing
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- 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
- Anchor Text code string is automatically modified by WordPress
- WordPress is converting & to & inbetween [code] brackets
- Print shortcode in custom action hook not where the shortcode is entered
- Disable email field on WooCommerce customer account details
- 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?
- update_post_meta() whenever custom post type is updated
- Where to save common libraries?
- 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
- 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
- Remove line breaks from ?
- Get post id in wordpress action?
- Need resource on available functions and objects
- WordPress wp_insert_post() returns 0 but not not wp_error
- Call add_action() in function wordpress
- Set default Custom Post Meta Value
- 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 to modify the action attribute of the wp-login.php?action=register form?
- adding multiple custom columns to users.php
- 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?
- 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
- 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
- WordPress 4.9.8 doesn’t save if content has style=”
- Why does my delete_post hook get called twice
- How to stop displaying the Id without losing the functionality
- Find Total Authors
- How to create a checkbox to show/hide a field in WooCommerce checkout [closed]
- how to display google maps with javascript
- How to pass https://achecker.ca/ validator? [closed]
- frontend submit post jQuery clone row won’t save
- login_headertitle is deprecated since version 5.2.0
- Run a function on all posts
- Advanced WordPress plugin activation detection
- How to write custom code on WordPress?
- save_post not triggered when a post is updated
- Remove Metaboxes
- Where do I add an action hook & callback in my theme?
- Edit post image attributes on fly?
- Select input in metabox not updated
- Woocommerce template file outputting tags
- WordPress sent multiple requests on update
- Add Tag to post after publishing
- wordpress prepare error
- Adding code to send referrer on login page
- Save_post – Warning: Cannot modify header information
- Modifying a WordPress Plugin
- Call to Action Button – Resize Help [closed]
- Unhook a function within a class in the child theme
- Manage recurring event time
- wp_editor save all content
- save_post affect creation and deletion
- 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
- How to implement custom Javascript to my site
- Am I using an action hook correctly?
- Hook To Get All Posts Deleted
- 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
- Changes in code only show after changing theme
- How wordpress plugin hooks works? [duplicate]
- Code Highlighting in BlockQuote
- feed url problem
- Add variable : 1 Week ago
- Changes to code not displaying