mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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' => '', ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user