Adds the ability to publish a post without triggering pingbacks, trackbacks, or notifying update services.
This plugin gives you the ability to publish a post without triggering pingbacks, trackbacks, or notifying update services.
A “Publish silently?” checkbox is added to the “Add New Post” and “Edit Post” admin pages (the latter only for unpublished posts). If checked when the post is published, that post will not trigger the pingbacks, trackbacks, and update service notifications that would 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 used after publish 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 to make a new post but prevent it from appearing on the front page of your blog and in feeds. (That plugin incorporates this plugin’s functionality, so you won’t need both.)
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
The plugin is further customizable via three filters. Code using these filters should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain). Less ideally, you could put them in your active theme’s functions.php file.
c2c_silent_publish_meta_key (filter)
The ‘c2c_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:
Example:
/** * Defines a custom meta key to be used by Silent Publish. * * @param string $custom_field_key The default custom field key name. * @return string */ function override_silent_publish_key( $custom_field_key ) { return '_my_custom_silent-publish'; } add_filter( 'c2c_silent_publish_meta_key', 'override_silent_publish_key' );
c2c_silent_publish_default (filter)
The ‘c2c_silent_publish_default’ filter allows you to override the default state of the ‘Silent Publish?’ checkbox.
Arguments:
Example:
// Have the Silent Publish? checkbox checked by default. add_filter( 'c2c_silent_publish_default', '__return_true' );
c2c_silent_publish_post_types (filter)
The ‘c2c_silent_publish_post_types’ filter allows you to override the post types that can be silently published.
Arguments:
Example:
/** * Disable Silent Publish for a custom public post type 'book'. * * @param array $post_types Array of post type names. * @return array */ function my_c2c_silent_publish_post_types( $post_types ) { $post_types = array_flip( $post_types ); unset( $post_types[ 'book' ] ); return array_keys( $post_types ). } add_filter( 'c2c_silent_publish_post_types', 'my_c2c_silent_publish_post_types' );
silent-publish.zip
inside the plugins directory for your site (typically wp-content/plugins/
)The "Status & Visibility" panel when creating a new post (when using the block editor) that shows the 'Silent publish?' checkbox used to enable silent publish. If you plan to make use of it, be sure to have it checked before publishing the post.
The "Status & Visibility" panel when editing a post that was published with silent publish enabled. The message "This post was silently published." is shown to indicate the post was silently published. If the post has been published without silent publish enabled, no text or checkbox would be shown in its place.
The 'Publish' sidebar box on the Add New Post admin page (for versions of WordPress older than 5.0, or later if the new block editor aka Gutenberg is disabled). The 'Publish silently?' checkbox is integrated alongside the existing fields.
The 'Publish' sidebar box when editing a post (under the classic editor) that was published with silent publish enabled. The message "This post was silently published." is shown to indicate the post was silently published. If the post has been published without silent publish enabled, no text or checkbox would be shown in its place.
The 'Silent publish?' checkbox displaying help text when hovering over the checkbox.
The quick edit panel, which also includes the 'Silent publish?' checkbox allowing the feature to be enabled for unpublished posts. And as seen in screenshots 2 and 4, if the post was already silently published the checkbox would instead display the message "This post was silently published.".
The admin post listing of posts showing the mute icon in the 'Date' column to indicate the post was (or will be) silently published.
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.
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 or a mu-plugin file.
If the “Silent publish?” checkbox had been checked at the time a post is published, the field will be shown but will disabled for that published post. Once a post is published, changing the value of the checkbox has no meaning, so there is no need to make it checkable. If you unpublish the post, the checkbox will again be clickable.
If the “Silent publish?” checkbox had not been checked at the time a post is published, the field will no longer be shown for that published post. Once a post is published, changing the value of the checkbox has no meaning, so there is no need to show it. If you unpublish the post, the checkbox will reappear.
Yes. You must first unpublish the post (by making it a draft or pending). Then uncheck the “Publish silently?” checkbox and republish the post. However, it’s a bit moot at that point; once a post has been published without having silent publish enabled for it then pingbacks, trackbacks, and other notifications about the post being published have already been sent.
No.
No. your posts will continue to be shared to social media sites upon publication (assuming it is configured to do so by whatever plugins you have in place to share your posts).
Yes.
Highlights:
Details:
add_to_quick_edit()
admin_enqueue_scripts()
is_silent_published()
to determine if silent publish is activated for a postis_silent_publish_on_by_default()
to solely reflect the default state of silent publish for new postsget_post_types()
for retrieving post typesc2c_silent_publish_post_types
to filter post typesadd_ui()
into new output_field()
create_post()
is_silent_publish_on_by_default()
to determine if silent publish should be enabled for posts by defaultregister_meta()
and properly register the existence of the post meta fieldis_silent_publish_on_by_default()
before attempting to use itdo_init()
into init()
apply_filters_deprecated()
to formally deprecate the ‘silent_publish_meta_key’ filterdo_action()
instead of apply_filters()
Full changelog is available in CHANGELOG.md.