Skip to content

wptt_shorten_link

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

Filter the URL passed when running a test function.

Auto-generated Example

add_filter(
   'wptt_shorten_link',
    function(
        string $testurl,
        string $title,
        int|bool $post_ID,
        bool $testing
    ) {
        // Your code here.
        return $testurl;
    },
    10,
    4
);

Parameters

  • string $testurl Unshortened test URL.
  • string $title Title text to use for URL shortener.
  • int|bool $post_ID Post ID. Default false.
  • bool $testing In testing mode. Default true.

Returns

string

Files

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 )

← All Hooks

Clone this wiki locally