Skip to content

wpt_staging_mode

github-actions[bot] edited this page Jun 20, 2026 · 3 revisions

Turn on staging mode. Staging mode is automatically turned on if WPT_STAGING_MODE constant is defined.

Auto-generated Example

add_filter(
   'wpt_staging_mode',
    function(
        bool $staging_mode,
        int|bool $auth,
        int $post_ID,
        string $service
    ) {
        // Your code here.
        return $staging_mode;
    },
    10,
    4
);

Parameters

  • bool $staging_mode True to enable staging mode.
  • int|bool $auth Current author.
  • int $post_ID Post ID.
  • string $service Service being put into staging.

Returns

bool

Files

apply_filters( 'wpt_staging_mode', false, $auth, $post_ID, 'mastodon' )
apply_filters( 'wpt_staging_mode', false, $auth, $post_ID, 'bluesky' )
apply_filters( 'wpt_staging_mode', false, $auth, $post_ID, 'x' )

← All Hooks

Clone this wiki locally