-
Notifications
You must be signed in to change notification settings - Fork 4
wpt_do_shortening
github-actions[bot] edited this page Jun 14, 2026
·
1 revision
Apply a custom shortener to your status update. Return false to allow the settings to parse the URL or a URL to shortcircuit plugin settings.
add_filter(
'wpt_do_shortening',
function(
bool $shrink,
string $shortener,
string $url,
string $post_title,
int $post_ID,
bool $testmode
) {
// Your code here.
return $shrink;
},
10,
6
);-
bool$shrinkFalse prior to shortening. -
string$shortenerShortener selected in settings. -
string$urlFull permalink URL to post. -
string$post_titleTitle of source post. -
int$post_IDPost ID. -
bool$testmodeTrue if running a test of XPoster.
string
apply_filters( 'wpt_do_shortening', false, $shortener, $url, $post_title, $post_ID, $testmode )