Ticket #24360: 24360.diff
| File 24360.diff, 2.3 KB (added by , 13 years ago) |
|---|
-
wp-admin/admin-header.php
87 87 88 88 if ( isset( $post ) && is_a( $post, 'WP_Post' ) && post_type_supports( get_post_type(), 'post-formats' ) ) { 89 89 $post_format = get_post_format(); 90 if ( ! $post_format ) { 90 91 if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) ) 92 $post_format = $_REQUEST['format']; 93 94 if ( ! $post_format ) 91 95 $post_format = 'standard'; 92 96 93 if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) )94 $post_format = $_REQUEST['format'];95 }96 97 97 $admin_body_class .= ' wp-format-' . $post_format; 98 98 99 99 $show_post_format_ui = false; -
wp-admin/edit-form-advanced.php
136 136 wp_enqueue_style( 'wp-mediaelement' ); 137 137 $post_format = get_post_format(); 138 138 139 if ( ! $post_format ) { 139 if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) ) 140 $post_format = $_REQUEST['format']; 141 142 if ( ! $post_format ) 140 143 $post_format = 'standard'; 141 144 142 if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) )143 $post_format = $_REQUEST['format'];144 }145 146 145 $format_class = " class='wp-format-{$post_format}'"; 147 146 148 147 $all_post_formats = array( … … 185 184 $active_post_type_slug = $slug; 186 185 } 187 186 188 $post_format_options .= '<a ' . $class . ' href="?format=' . $slug . '" data-description="' . $attr['description'] . '" data-wp-format="' . $slug . '" title="' . ucfirst( $slug ) . '"><div class="' . $slug . '"></div><span class="post-format-title">' . ucfirst( $slug ) . '</span></a>'; 187 $url = add_query_arg( 'format', $slug ); 188 189 $post_format_options .= '<a ' . $class . ' href="' . esc_url( $url ) . '" data-description="' . $attr['description'] . '" data-wp-format="' . $slug . '" title="' . ucfirst( $slug ) . '"><div class="' . $slug . '"></div><span class="post-format-title">' . ucfirst( $slug ) . '</span></a>'; 189 190 } 190 191 191 192 $current_post_format = array( 'currentPostFormat' => esc_html( $active_post_type_slug ) );