Silent Publish
- Author:Scott Reilly
- Version:2.2.1
- Last update:2010-09-24
- Compatibility:WP 2.9 – 3.3.1
- Comments:go here
- Download:[ zip ]
- Description:
Adds the ability to publish a post without triggering pingbacks, trackbacks, or notifying update services.
-
Extended Description
Adds the ability to publish a post without triggering pingbacks, trackbacks, or notifying update services.
This plugin adds a “Publish silently?” checkbox to the “Write Post” admin page. If checked when the post is published, that post will not trigger the pingbacks, trackbacks, and update service notifications that might typically occur.
In every other manner, the post is published as usual: it’ll appear on the front page, archives, and feeds as expected, and no other aspect of the post is affected.
While trackbacks and pingsbacks can already be disabled from the Add New Post/Page page, this plugin makes things easier by allowing a single checkbox to disable those things, in addition to disabling notification of update services which otherwise could only be disabled by clearing the value of the global setting, which would then affect all authors and any subsequently published posts.
If a post is silently published, a custom field ‘_silent_publish’ for the post is set to a value of 1 as a means of recording the action. However, this value is not then used for any purpose as of yet. Nor is the custom field unset or changed if the post is later re-published.
Also see my “Stealth Publish” plugin if you want make a new post but prevent it from appearing on the front page of your blog and not appear in feeds. (That plugin incorporates this plugin’s functionality, so you won’t need both.)
Links: Plugin Homepage | Plugin Directory Page | Author Homepage
Find out more at the plugin’s WordPress Plugin Repository page.
-
Screenshots
Click to see full-size image.
Installation
- Unzip
silent-publish.zipinside the/wp-content/plugins/directory for your site (or install via the built-in WordPress plugin installer) - Activate the plugin through the ‘Plugins’ admin menu in WordPress
- Click the ‘Publish silently?’ checkbox when publishing a post to prevent triggering of pingbacks, trackbacks, or notifications to update services.
- Unzip
-
Filters
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.
silent_publish_meta_key (filter)
The ‘silent_publish_meta_key’ filter allows you to override the name of the custom field key used by the plugin to store a post’s silent publish status. This isn’t a common need.
Arguments:
- $custom_field_key (string): The custom field key to be used by the plugin. By default this is ‘_silent-publish’.
Example:
add_filter( 'silent_publish_meta_key', 'override_silent_publish_key' ); function override_silent_publish_key( $custom_field_key ) { return '_my_custom_silent-publish'; }c2c_silent_publish_default (filter)
The ‘c2c_silent_publish_default’ filter allows you to override the default state of the ‘Silent Publish?’ checkbox.
Arguments:
- $state (boolean): The default state of the checkbox. By default this is false.
- $post (WP_Post): The post currently being created/edited.
Example:
// Have the Silent Publish? checkbox checked by default. add_filter( 'c2c_silent_publish_default', '__return_true' );
Frequently Asked Questions
Q. Why would I want to silent publish a post?
A. Perhaps for a particular post you don’t want any external notifications sent out. If checked when the post is published, that post will not trigger the pingbacks, trackbacks, and update service notifications that might typically occur.Q. Can I have the checkbox checked by default?
A. Yes. See the Filters section (under Other Notes) and look for the example using the ‘c2c_silent_publish_default’ filter. You’ll have to put that code into your active theme’s functions.php file.
Release Log
2.2.1
- Add version() to return plugin’s version
- Update readme with example and documentation for new filter
- Note compatibility through WP 3.3+
- Update screenshots for WP 3.3
- Use DIRECTORY_SEPARATOR instead of hardcoded ‘/’
- Create ‘lang’ subdirectory and move .pot file into it
- Regenerate .pot
- Add ‘Domain Path’ directive to top of main plugin file
- Add link to plugin directory page to readme.txt
- Update copyright date (2012)
2.2
- Fix bug where using Quick Edit on post caused Silent Publish status to be cleared
- Add filter ‘c2c_silent_publish_default’ to allow configuring checkbox to be checked by default
- Note compatibility through WP 3.2+
- Minor code formatting changes (spacing)
- Fix plugin homepage and author links in description in readme.txt
2.1
- Switch from object instantiation to direct class invocation
- Explicitly declare all functions public static and class variables private static
- Remove setting unnecessary variable
- Note compatibility through WP 3.1+
- Update copyright date (2011)
2.0.1
- Bugfix for auto-save losing value of silent publish status
2.0
- Re-implemented entire approach
- Allow overriding of custom field used via ‘silent_publish_meta_key’ filter
- Add class of ‘c2c-silent-publish’ to admin UI div containing checkbox
- Add filter ‘silent_publish_meta_key’ to allow overriding custom field key name
- Remove function add_js(), admin_menu(), add_meta_box()
- Add functions init(), add_ui(), save_silent_publish_status(), load_textdomain()
- Add true localization support
- Move definition of strings into init() and properly support localization
- Full support for localization
- Store plugin instance in global variable, $c2c_silent_publish, to allow for external manipulation
- Remove docs from top of plugin file (all that and more are in readme.txt)
- Minor code reformatting (spacing)
- Add PHPDoc documentation
- Note compatibility with WP 2.9+, 3.0+
- Drop compatibility with versions of WP older than 2.9
- Update screenshots
- Update copyright date
- Add package info to top of plugin file
- Add Changelog, Frequently Asked Questions, Filters, and Upgrade Notice sections to readme.txt
- Add .pot file
- Add to plugin repository
1.0
- Initial release
Copyright & Disclaimer
Copyright © 2010 by Scott Reilly (aka coffee2code)Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


