Make WordPress Core


Ignore:
Timestamp:
02/28/2015 08:07:45 PM (10 years ago)
Author:
azaozz
Message:

PressThis:

  • Remove unneeded passing of post formats strings to JS.
  • Set the currently selected post format name with jQuery.

See #31373.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r31588 r31589  
    3232     */
    3333    public function site_settings() {
    34         $supported_formats = get_theme_support( 'post-formats' );
    35         $post_formats      = array();
    36 
    37         if ( ! empty( $supported_formats[0] ) && is_array( $supported_formats[0] ) ) {
    38             $post_formats[0] = __( 'Standard' );
    39             foreach ( $supported_formats[0] as $post_format ) {
    40                 $post_formats[ $post_format ] = esc_html( get_post_format_string( $post_format ) );
    41             }
    42         }
    43 
    4434        return array(
    45             'version'         => 5,
    46             'post_formats'    => $post_formats,
     35            // Used to trigger the bookmarklet update notice.
     36            // Needs to be set here and in get_shortcut_link() in wp-includes/link-template.php.
     37            'version' => '5',
    4738
    4839            /**
Note: See TracChangeset for help on using the changeset viewer.