Don't show a shortlink button if we don't have one. See #14772.
git-svn-id: https://develop.svn.wordpress.org/trunk@16076 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
94ed154f65
commit
bcd5c65438
@ -169,8 +169,10 @@ function wp_admin_bar_blog_separator() {
|
||||
*/
|
||||
function wp_admin_bar_bloginfo_menu() {
|
||||
global $wp_admin_bar;
|
||||
|
||||
$wp_admin_bar->add_menu( array( 'id' => 'get-shortlink', 'title' => __( 'Get Shortlink' ), 'href' => '', ) );
|
||||
|
||||
$short = wp_get_shortlink( 0, 'query' );
|
||||
if ( ! empty( $short) )
|
||||
$wp_admin_bar->add_menu( array( 'id' => 'get-shortlink', 'title' => __( 'Get Shortlink' ), 'href' => '', ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user