-
Notifications
You must be signed in to change notification settings - Fork 4
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.
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
);-
string$post_statusText to status update truncated to maximum allowed length. -
string$updateOriginal passed text. -
int$post_IDPost ID. -
bool$repostBoolean flag that indicates whether this is being reposted. -
int$referencePass reference (1).
string
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 )