Skip to content

wpt_do_tweet

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

Filter the approval to send a Tweet.

Auto-generated Example

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

Parameters

  • bool $do_tweet Return false to cancel this Tweet.
  • int|bool $auth Author.
  • int $post_ID Post ID.
  • string $twit Tweet text.

Returns

bool

Files

apply_filters( 'wpt_do_tweet', true, $auth, $post_ID, $status['text'] )

← All Hooks

Clone this wiki locally