Ticket #14772: 14772.shortlink.diff

File 14772.shortlink.diff, 516 bytes (added by caesarsgrunt, 3 years ago)

Make the Shortlink item link to the shortlinkinstead of the permalink

Line 
1Index: wp-includes/admin-bar.php
2===================================================================
3--- wp-includes/admin-bar.php   (revision 16285)
4+++ wp-includes/admin-bar.php   (working copy)
5@@ -164,7 +164,7 @@
6        $short = wp_get_shortlink( 0, 'query' );
7 
8        if ( ! empty( $short) )
9-               $wp_admin_bar->add_menu( array( 'id' => 'get-shortlink', 'title' => __( 'Shortlink' ), 'href' => '', ) );
10+               $wp_admin_bar->add_menu( array( 'id' => 'get-shortlink', 'title' => __( 'Shortlink' ), 'href' => $short, ) );
11 }
12 
13 /**