WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Stealth Publish

Prevent specified posts from being featured on the front page or in feeds, and from notifying external services of publication.

Filters

The plugin is further customizable via three filters. Typically, these customizations would be put into your active theme's functions.php file, or used by another plugin.

c2c_stealth_publish_meta_key (filter)

The 'c2c_stealth_publish_meta_key' filter allows you to override the name of the custom field key used by the plugin to store a post's stealth 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 '_stealth-publish'.

Example:

add_filter( 'c2c_stealth_publish_meta_key', 'override_stealth_publish_key' );
function override_stealth_publish_key( $custom_field_key ) {
    return '_my_custom_stealth-publish';
}

c2c_stealth_publish_silent (filter)

The 'c2c_stealth_publish_silent' filter allows you to override whether the plugin also ensure the post gets published silently (i.e. without sending out pingbacks, tracbacks, and pings to update services).

Arguments:

  • $publish_silently (bool): Should stealth published posts also be published silently? By default this is 'true'.
  • $post_id (int): The ID of the post being published.

Example:

// Disable silent publishing for stealth published posts
add_filter( 'c2c_stealth_publish_silent', 'override_stealth_publish_silent' );
function override_stealth_publish_silent( $publish_silently, $post_id ) {
    return false;
}

c2c_stealth_publish_default (filter)

The 'c2c_stealth_publish_default' filter allows you to override the default state of the 'Stealth 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 Stealth Publish? checkbox checked by default.
add_filter( 'c2c_stealth_publish_default', '__return_true' );

Requires: 3.6 or higher
Compatible up to: 3.8.3
Last Updated: 2014-1-24
Downloads: 15,085

Ratings

4 stars
4.6 out of 5 stars

Support

0 of 5 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Broken :(

0 people say it works.
10 people say it's broken.

0,1,0
100,1,1
50,2,1 100,1,1
100,2,2
100,2,2
0,1,0
100,1,1
100,1,1
100,1,1
0,10,0