-
Notifications
You must be signed in to change notification settings - Fork 4
wptt_shorten_link
github-actions[bot] edited this page Jun 19, 2026
·
2 revisions
Filter the URL passed when running a test function.
add_filter(
'wptt_shorten_link',
function(
string $testurl,
string $title,
int|bool $post_ID,
bool $testing
) {
// Your code here.
return $testurl;
},
10,
4
);-
string$testurlUnshortened test URL. -
string$titleTitle text to use for URL shortener. -
int|bool$post_IDPost ID. Default false. -
bool$testingIn testing mode. Default true.
string
apply_filters( 'wptt_shorten_link', $thispostlink, $thislinkname, false, 'link' )apply_filters( 'wptt_shorten_link', $post['postLink'], $post['postTitle'], $post_ID, false )apply_filters( 'wptt_shorten_link', $testurl, $title, false, true )