From 71793b661cf9d208326bc134a6eaf00fcd8020fd Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 26 Aug 2013 16:05:46 +0000 Subject: [PATCH] Don't show the "Get Shortlink" button for pages with a ?page_id=x permalink. Props sillybean fixes #14760 git-svn-id: https://develop.svn.wordpress.org/trunk@25122 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-form-advanced.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index 4fef80f0eb..aba54f6ab5 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -368,7 +368,8 @@ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); public ? get_sample_permalink_html($post->ID) : ''; $shortlink = wp_get_shortlink($post->ID, 'post'); -if ( !empty( $shortlink ) && $shortlink !== get_permalink( $post->ID ) ) +$permalink = get_permalink( $post->ID ); +if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) ) $sample_permalink_html .= '' . __('Get Shortlink') . ''; if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) {