pre_get_shortlink

pre_get_shortlink

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-5.4.1

apply_filters('pre_get_shortlink') is found 1 times:

  • /wp-includes/link-template.php line 3867
    	 * @param int         $id          Post ID, or 0 for the current post.
    	 * @param string      $context     The context for the link. One of 'post' or 'query',
    	 * @param bool        $allow_slugs Whether to allow post slugs in the shortlink.
    	 */
    	$shortlink = apply_filters( 'pre_get_shortlink', false, $id, $context, $allow_slugs );
    
    	if ( false !== $shortlink ) {
    		return $shortlink;
    	}
    
    	$post_id = 0;
    

See this hook used in plugins: