You omitted how is this function called. I assume it is added to save_post action.
This action passes current post id as argument. In case of revision that would be revision id and not parent post id. So, as I see it, there is no reason to save additional data for revision (creating duplicate set of it).
Update.
Scratch that.
I looked through source code. Apparently *_post_meta functions will automatically change to parent post id if passed revision post id. So you might modify original post, thinking you are modifying revision.
Related Posts:
- ‘Global’ settings page for multisite plugin
- What Are Security Best Practices for WordPress Plugins and Themes? [closed]
- How do I show data from gravity forms in my template? [closed]
- How can I add a featured image to a page?
- How to customize a plugin whilst maintaining ability to upgrade
- PHP code on Visual Composer Plugin
- How are plugins in the WordPress plugin directory ranked?
- How can I log a user out of WordPress before the page loads?
- What does a security risk in a plugin look like?
- How to generate/update a XML sitemap without plugins?
- How to assign user a role if none is present when logging in
- update_meta_user difference in i:1 and b:1, how to write b:1
- Registration Form Validation in wordpress
- Migrating a File from Plugin to Theme and changing its path → instead create a REST endpoint
- Access wordpress functions inside a plugin class
- resize only height using wp_get_image_editor
- View the source code of a 3rd party plugin? [closed]
- How to find out what blocks are added by a plugin
- Can’t access my WP dashboard: fatal error? [closed]
- allow arabic letters when register new account
- Use plugin or custom post type for game score functionality
- How can I see the error generated by plugin activation?
- Cannot access wp-admin after disabling all plugin
- What is Stable Tag in WordPress plugin readme file
- Next and/or previous post content
- How To Clean The Malware Infected & Hacked WordPress Websites? [duplicate]
- How to remove style and js from theme and add your own style and js where shortcode is used?
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- Re-naming a theme/child theme whilst maintaining updates
- Get posts from WP_Query and format them on admin_head
- Redux Framework has an embedded demo. Click here to activate the sample config file
- Pull out Advanced Custom Fields in Related post plugin
- Can’t Update or Delete Plugins From WordPress
- Set and access global variable
- Is there a way to test that readme looks in other language before submitting translation?
- Insert content of a post into another
- ob_start() combined with wp_query
- Theme/Plugin installation through url on button click
- w3 Total Cache not Caching – Requested URI is rejected [closed]
- Which file of wordpress manage plugins functionalities?
- Can I put in Github the code of a abandoned plugin I want to fork?
- How to use login_redirect with a user capability
- I should enable automatic updates?
- Form that generates an ID for the customer
- Access a particular field in an array
- Passing stored variables to add_filter
- plugin shortcode not working on ajax request call
- Ajax Plugin Not Echoing Response
- Different custom templates for product category [closed]
- How to check wp_options’s rewrite_rules if current and existing are the same before flush the rules?
- is_rtl returns false while it should return true
- How to create wordpress page that lets users create their own quiz? [closed]
- Can i legally remove a credit from a free plugin on wordpress.org? [closed]
- How to reinstate previously saved option?
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Woocommerce product info in a sidebar?
- Localise settings section headline
- Google Appointments in WordPress?
- wp_options not returning value for logged out users?
- Gutenberg default attributes are empty when accessing in edit
- how to create a custom page in child theme or plugin?
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function
- Hide all Admin Notices and move on a separate page
- Front Page of Site Has Gone Replaced By Random Page
- Genesis Child Theme – Customize body
- Creating categories while importing via CSV
- Multiple wordpress installations with same plugin folder (Apache Virtualhost)
- How can I show login popup when user clicks on download button
- Website content not displayed anymore after updates
- Flexslider empty slide
- WordPress plugin changes not updating
- Adding javascript to header of MetroMagazine theme
- How to Save settings of custom tab product page in admin side in a database?
- Issue: CSV file upload works only when “View page source” is done
- Meta box: Undefined index
- How to update plugins in a distributed wordpress scenario?
- galleria for WordPress not working properly on Mobile devices (responsive)?
- Get plugin versions in xml/json format
- Shortcode registered from a plugin not recognized
- Make a wordpress site similar to Hot Or Not – Image rating system [closed]
- How to submit readme.txt file in wordpress directory
- wordpress shortcode A executing code from shortcode B
- Plugin for Reading Documents, PDF’s etc
- Simple Data Table Update and Page Integration
- How to create plugin list groups?
- Show latest and related articles from 3 different blogs
- Woocommerce custom fields
- This plugin throws error on the events page only [closed]
- WordPress Code Access to Restricted Content without Registration
- How to pre-set WordPress settings for specific posts?
- Two sites one PC
- PHP if url extension action=discussion condition use [closed]
- Is it possible to set different payment gateway on each Gravity Forms form? [closed]
- How to get URL param for pagination in shortcode?
- How to add an active state class to my info box
- Using ACF to allow user to add and edit multiple saved forms
- Difficult case to solve – Select + select = result(related data)
- How to disable display all posts from all categories?
- Custom Login and Password Reset for BuddyPress Website