Adds the ability to update a post without having WordPress automatically update the post's post_modified timestamp.
This plugin allows you to choose to update a post without having WordPress automatically update the post’s post_modified timestamp.
WordPress maintains a post field called post_modified which tracks the date the post was last edited. This value is used by feeds to indicate the latest update to each post or to report the latest updated post. Plugins and themes may also reference the post modification date to call attention to posts that have been updated. However, if an update is such that you don’t want it to be recorded in the post_modified date field (perhaps due to the update being a small formatting/editing change or fixing a typo, or if you just want to keep quiet about an update), then this plugin is for you.
This plugin adds a “Stealth update?” checkbox to the “Publish” box of any post’s or page’s “Edit Post” admin page.
Note: The plugin records when a post is stealth updated, so subsequent edits of the post will have the “Stealth update?” checkbox checked by default.
Links: Plugin Homepage | Plugin Directory Page | Author Homepage
The plugin is further customizable via two filters. Typically, these customizations would be put into your active theme’s functions.php file, or used by another plugin.
The ‘c2c_stealth_update_meta_key’ filter allows you to override the name of the custom field key used by the plugin to store a post’s stealth update status. This isn’t a common need.
Arguments:
Example:
/** * Defines a custom meta key to be used by Stealth Update. * * @param string $custom_field_key The default custom field key name. * @return string */ function override_stealth_update_key( $custom_field_key ) { return '_my_custom_stealth-update'; } add_filter( 'c2c_stealth_update_meta_key', 'override_stealth_update_key' );
The ‘c2c_stealth_update_default’ filter allows you to override the default state of the ‘Stealth Update?’ checkbox.
Arguments:
Example:
// Have the Stealth Update? checkbox checked by default. add_filter( 'c2c_stealth_update_default', '__return_true' );
stealth-update.zip
inside the /wp-content/plugins/
directory (or install via the built-in WordPress plugin installer)A screenshot of the 'Publish' sidebar box on the Edit Post admin page. The 'Stealth update?' checkbox is integrated alongside the existing fields.
A screenshot of the 'Stealth update?' checkbox displaying help text when hovering over the checkbox.
A screenshot of the 'Stealth update?' checkbox in the quick edit form.
A screenshot of the lock adjacent to the post date for a post that has stealth update enabled.
This update dates for posts are used by feeds to indicate the latest update to each post or to report the latest updated post. Plugins and other manual uses of some of WordPress’s template tags may also reference the post modification date to call attention to posts that have been updated. However, if an update is such that you don’t want it to be recorded in the post_modified date field (perhaps due to the update being a small formatting/editing change or fix, or if you just want to keep quiet about an update), then this plugin is for you.
Yes. See the Filters section (under Other Notes) and look for the example using the ‘c2c_stealth_update_default’ filter. You’ll have to put that code into your active theme’s functions.php file. Note that if a post was updated with the checkbox checked, when that post gets edited again the checkbox will be checked by default.
Yes.
Highlights:
* This release adds the ability to set the stealth update checkbox via the quick edit box, adds a lock icon next to the post date in the admin listing to denote a post has stealth update enabled, adds support for language packs, and has some minor behind-the-scenes changes.
Details:
* New: Add ability to set the ‘Stealth Update?’ value in the Quick Edit form.
* Add add_to_submitbox()
, add_to_quick_edit()
, admin_enqueue_scripts()
.
* Add option arg $checked
to add_ui()
and use its value as the default if not null.
* Props ecdltf.
* New: Add lock icon next to post’s date column in posts table to indicate which posts have stealth update enabled.
* Bugfix: Don’t bother operating on newly created posts since their saving isn’t an update.
* Change: Delete meta key on save if stealth update is not enabled for post.
* Change: Don’t unnecessarily set hidden field with original post_modified value.
* Change: Run esc_attr()
on the field name before display for safety.
* Change: Don’t run esc_attr()
on meta key name as it need not be so restrictive (and isn’t for display).
* Change: Add support for language packs:
* Set textdomain using a string instead of a variable.
* Don’t load textdomain from file.
* Remove ‘Domain Path’ from plugin header.
* Remove .pot file and /lang subdirectory.
* Change: Add docblocks for class variables.
* New: Add LICENSE file.
* New: Add empty index.php to prevent files from being listed if web server has enabled directory listings.
* Change: Add docblock to example code.
* Change: Note compatibility through WP 4.5+.
* Change: Update copyright date (2016).
dirname(__FILE__)
; DIR is only supported in PHP 5.3+dirname(__FILE__)
load_textdomain()