diff --git a/src/wp-admin/includes/class-wp-press-this.php b/src/wp-admin/includes/class-wp-press-this.php index 7b5fd914a1..b3acb52b5c 100644 --- a/src/wp-admin/includes/class-wp-press-this.php +++ b/src/wp-admin/includes/class-wp-press-this.php @@ -31,19 +31,10 @@ class WP_Press_This { * @return array Site settings. */ public function site_settings() { - $supported_formats = get_theme_support( 'post-formats' ); - $post_formats = array(); - - if ( ! empty( $supported_formats[0] ) && is_array( $supported_formats[0] ) ) { - $post_formats[0] = __( 'Standard' ); - foreach ( $supported_formats[0] as $post_format ) { - $post_formats[ $post_format ] = esc_html( get_post_format_string( $post_format ) ); - } - } - return array( - 'version' => 5, - 'post_formats' => $post_formats, + // Used to trigger the bookmarklet update notice. + // Needs to be set here and in get_shortcut_link() in wp-includes/link-template.php. + 'version' => '5', /** * Filter whether or not Press This should redirect the user in the parent window upon save. diff --git a/src/wp-admin/js/press-this.js b/src/wp-admin/js/press-this.js index 4f934c721a..9836a2602e 100644 --- a/src/wp-admin/js/press-this.js +++ b/src/wp-admin/js/press-this.js @@ -524,18 +524,6 @@ hasSetFocus = true; } - /** - * Adds the currently selected post format next to the option, in the options panel. - * - * @param format string Post format to be displayed - */ - function setPostFormatString( format ) { - if ( ! format || ! siteConfig || ! siteConfig.post_formats || ! siteConfig.post_formats[ format ] ) { - return; - } - $( '#post-option-post-format' ).text( siteConfig.post_formats[ format ] ); - } - /** * Save a new user-generated category via AJAX */ @@ -953,7 +941,7 @@ var $this = $( this ); if ( $this.is( ':checked' ) ) { - setPostFormatString( $this.attr( 'id' ).replace( /^post-format-(.+)$/, '$1' ) ); + $( '#post-option-post-format' ).text( $( 'label[for="' + $this.attr( 'id' ) + '"]' ).text() || '' ); } } );