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:
Peter Westwood 2010-10-29 13:58:14 +00:00
parent 94ed154f65
commit bcd5c65438
1 changed files with 4 additions and 2 deletions

View File

@ -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' => '', ) );
}
/**