[wp-trac] [WordPress Trac] #33495: Shortlinks are no longer useful by default

WordPress Trac noreply at wordpress.org
Fri Sep 25 19:53:30 UTC 2015


#33495: Shortlinks are no longer useful by default
--------------------------------------+-----------------------------
 Reporter:  helen                     |       Owner:  grvrulz
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  4.4
Component:  Permalinks                |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  good-first-bug has-patch  |     Focuses:  administration
--------------------------------------+-----------------------------
Changes (by helen):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"34556"]:
 {{{
 #!CommitTicketReference repository="" revision="34556"
 Shortlinks: Hide the Get Shortlink button by default.

 Shortlinks had their day in the popular usage sun before all these
 services moved to their own shorteners and running your own custom one
 became a lot easier. Shortlinks are still useful in some contexts, such as
 analytics or when links need to be shared verbally or copied down by hand.

 If any filters are hooked onto `pre_get_shortlink` or `get_shortlink` and
 produce a non-empty value (with an exception described below), the button
 will magically reappear. This allows any custom shortlinks to keep the
 button without hiccups.

 If you're in need of the default shortlinks, the fastest way to reenable
 them is `add_filter( 'pre_get_shortlink', '__return_false' )`. Note that
 it must return false in order to continue on to the rest of
 `wp_get_shortlink()`.

 props grvrulz for the initial patch.
 fixes #33495.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33495#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list