Skip to content

wpt_custom_truncate

github-actions[bot] edited this page Jun 14, 2026 · 1 revision

Filter a status update template after all content checks are completed.

Auto-generated Example

add_filter(
   'wpt_custom_truncate',
    function(
        string $post_status,
        string $update,
        int $post_ID,
        bool $repost,
        int $reference
    ) {
        // Your code here.
        return $post_status;
    },
    10,
    5
);

Parameters

  • string $post_status Text to status update truncated to maximum allowed length.
  • string $update Original passed text.
  • int $post_ID Post ID.
  • bool $repost Boolean flag that indicates whether this is being reposted.
  • int $reference Pass reference (1).

Returns

string

Files

apply_filters( 'wpt_custom_truncate', $post_update, $update, $post_ID, $repost, 1 )
apply_filters( 'wpt_custom_truncate', $post_update, $update, $post_ID, $repost, 2 )
apply_filters( 'wpt_custom_truncate', $post_update, $update, $post_ID, $repost, 3 )

← All Hooks

Clone this wiki locally