Warning: This hook has been deprecated.

apply_filters( 'shortcut_link', string $link )

Filters the Press This bookmarklet link.


Parameters Parameters

$link

(string) The Press This bookmarklet link.


Top ↑

Source Source

File: wp-includes/deprecated.php

View on Trac



Top ↑

Changelog Changelog

Changelog
Version Description
4.9.0 This hook has been deprecated.
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by stevenlinx

    Example migrated from Codex:

    Create a “Press This” button for a custom post type called example.

    add_filter('shortcut_link', 'press_this_ptype', 11);
    
    function press_this_ptype($link) {
    	$post_type = 'example';
    
    	$link = str_replace('post-new.php', "post-new.php?post_type=$post_type", $link);
    	$link = str_replace('?u=', '&u=', $link);
    
    	return $link;
    }
    

You must log in before being able to contribute a note or feedback.