Ticket #23503: 23503.3.patch
File 23503.3.patch, 9.0 KB (added by , 12 years ago) |
---|
-
wp-admin/edit-form-advanced.php
142 142 143 143 $all_post_formats = array( 144 144 'standard' => array ( 145 'title' => $post_type_object->labels->formats->post_format_standard, 145 146 'description' => __( 'Add a title and use the editor to compose your post.' ) 146 147 ), 147 148 'image' => array ( 149 'title' => $post_type_object->labels->formats->post_format_image, 148 150 'description' => __( 'Select or upload an image to use for your post.' ) 149 151 ), 150 152 'gallery' => array ( 153 'title' => $post_type_object->labels->formats->post_format_gallery, 151 154 'description' => __( 'Use the Add Media button to select or upload images for your gallery.' ) 152 155 ), 153 156 'link' => array ( 157 'title' => $post_type_object->labels->formats->post_format_link, 154 158 'description' => __( 'Add a link URL below.' ) 155 159 ), 156 160 'video' => array ( 161 'title' => $post_type_object->labels->formats->post_format_video, 157 162 'description' => __( 'Select or upload a video, or paste a video embed code into the box.' ) 158 163 ), 159 164 'audio' => array ( 165 'title' => $post_type_object->labels->formats->post_format_audio, 160 166 'description' => __( 'Select or upload an audio file, or paste an audio embed code into the box.' ) 161 167 ), 162 168 'chat' => array ( 169 'title' => $post_type_object->labels->formats->post_format_chat, 163 170 'description' => __( 'Copy a chat or Q&A transcript into the editor.' ) 164 171 ), 165 172 'status' => array ( 173 'title' => $post_type_object->labels->formats->post_format_status, 166 174 'description' => __( 'Use the editor to compose a status update. What’s new?' ) 167 175 ), 168 176 'quote' => array ( 177 'title' => $post_type_object->labels->formats->post_format_quote, 169 178 'description' => __( 'Copy a quotation into the box. Also add the source and URL if you have them.' ) 170 179 ), 171 180 'aside' => array ( 181 'title' => $post_type_object->labels->formats->post_format_aside, 172 182 'description' => __( 'An aside is a quick thought or side topic. Use the editor to compose one.' ) 173 183 ) 174 184 ); … … 183 193 $active_post_format_description = $attr['description']; 184 194 } 185 195 186 $post_format_options .= '<a ' . $class . ' href="?format=' . $slug . '" data-description="' . $attr['description'] . '" data-wp-format="' . $slug . '" title="' . ucfirst( sprintf( __( '%s Post' ), $slug )) . '"><div class="' . $slug . '"></div></a>';196 $post_format_options .= '<a ' . $class . ' href="?format=' . $slug . '" data-description="' . esc_attr( $attr['description'] ) . '" data-wp-format="' . $slug . '" title="' . esc_attr( $attr['title'] ) . '"><div class="' . $slug . '"></div></a>'; 187 197 } 188 198 189 199 $current_post_format = array( 'currentPostFormat' => esc_html( $active_post_type_slug ) ); … … 405 415 406 416 <?php if ( ! empty( $post_format_options ) ) : ?> 407 417 <div class="post-format-options"> 408 <span class="post-format-tip"> Standard Post</span>418 <span class="post-format-tip"><?php echo $all_post_formats[$post_format]['title']; ?></span> 409 419 <?php echo $post_format_options; ?> 410 420 </div> 411 421 <?php endif; ?> -
wp-admin/includes/meta-boxes.php
315 315 $post_formats[0][] = $post_format; 316 316 ?> 317 317 <div id="post-formats-select"> 318 <input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> <label for="post-format-0"><?php _e('Standard'); ?></label>318 <input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> <label for="post-format-0"><?php echo get_post_format_string( 'standard' ); ?></label> 319 319 <?php foreach ( $post_formats[0] as $format ) : ?> 320 320 <br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label> 321 321 <?php endforeach; ?><br /> -
wp-admin/options-writing.php
87 87 <th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th> 88 88 <td> 89 89 <select name="default_post_format" id="default_post_format"> 90 <option value="0"><?php _e('Standard'); ?></option>90 <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option> 91 91 <?php foreach ( $post_formats[0] as $format ): ?> 92 92 <option<?php selected( get_option('default_post_format'), $format ); ?> value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option> 93 93 <?php endforeach; ?> -
wp-includes/post.php
1436 1436 'not_found' => array( __('No posts found.'), __('No pages found.') ), 1437 1437 'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ), 1438 1438 'parent_item_colon' => array( null, __('Parent Page:') ), 1439 'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ) 1439 'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ), 1440 'formats' => array( 1441 'post_format_standard' => array( _x( 'Standard Post', 'Post format' ), _x( 'Standard Page', 'Post format' ) ), 1442 'post_format_standard_edit' => array( _x( 'Edit Standard Post', 'Edit post format' ), _x( 'Edit Standard Page', 'Edit post format' ) ), 1443 'post_format_aside' => array( _x( 'Aside Post', 'Post format' ), _x( 'Aside Page', 'Post format' ) ), 1444 'post_format_aside_edit' => array( _x( 'Edit Aside Post', 'Edit post format' ), _x( 'Edit Aside Page', 'Edit post format' ) ), 1445 'post_format_chat' => array( _x( 'Chat Post', 'Post format' ), _x( 'Chat Page', 'Post format' ) ), 1446 'post_format_chat_edit' => array( _x( 'Edit Chat Post', 'Edit post format' ), _x( 'Edit Chat Page', 'Edit post format' ) ), 1447 'post_format_gallery' => array( _x( 'Gallery Post', 'Post format' ), _x( 'Gallery Page', 'Post format' ) ), 1448 'post_format_gallery_edit' => array( _x( 'Edit Gallery Post', 'Edit post format' ), _x( 'Edit Gallery Page', 'Edit post format' ) ), 1449 'post_format_link' => array( _x( 'Link Post', 'Post format' ), _x( 'Link Page', 'Post format' ) ), 1450 'post_format_link_edit' => array( _x( 'Edit Link Post', 'Edit post format' ), _x( 'Edit Link Page', 'Edit post format' ) ), 1451 'post_format_image' => array( _x( 'Image Post', 'Post format' ), _x( 'Image Page', 'Post format' ) ), 1452 'post_format_image_edit' => array( _x( 'Edit Image Post', 'Edit post format' ), _x( 'Edit Image Page', 'Edit post format' ) ), 1453 'post_format_quote' => array( _x( 'Quote Post', 'Post format' ), _x( 'Quote Page', 'Post format' ) ), 1454 'post_format_quote_edit' => array( _x( 'Edit Quote Post', 'Edit post format' ), _x( 'Edit Quote Page', 'Edit post format' ) ), 1455 'post_format_status' => array( _x( 'Status Post', 'Post format' ), _x( 'Status Page', 'Post format' ) ), 1456 'post_format_status_edit' => array( _x( 'Edit Status Post', 'Edit post format' ), _x( 'Edit Status Page', 'Edit post format' ) ), 1457 'post_format_video' => array( _x( 'Video Post', 'Post format' ), _x( 'Video Page', 'Post format' ) ), 1458 'post_format_video_edit' => array( _x( 'Edit Video Post', 'Edit post format' ), _x( 'Edit Video Page', 'Edit post format' ) ), 1459 'post_format_audio' => array( _x( 'Audio Post', 'Post format' ), _x( 'Audio Page', 'Post format' ) ), 1460 'post_format_audio_edit' => array( _x( 'Edit Audio Post', 'Edit post format' ), _x( 'Edit Audio Page', 'Edit post format' ) ) 1461 ) 1440 1462 ); 1441 1463 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; 1442 1464 … … 1469 1491 if ( !isset( $object->labels['all_items'] ) && isset( $object->labels['menu_name'] ) ) 1470 1492 $object->labels['all_items'] = $object->labels['menu_name']; 1471 1493 1472 foreach ( $nohier_vs_hier_defaults as $key => $value ) 1473 $defaults[$key] = $object->hierarchical ? $value[1] : $value[0]; 1494 foreach ( $nohier_vs_hier_defaults as $key => $value ) { 1495 if ( 'formats' == $key ) { 1496 foreach ( $value as $format => $_value ) 1497 $defaults['formats']->$format = $object->hierarchical ? $_value[1] : $_value[0]; 1498 } else { 1499 $defaults[$key] = $object->hierarchical ? $value[1] : $value[0]; 1500 } 1501 } 1474 1502 1475 1503 $labels = array_merge( $defaults, $object->labels ); 1476 1504 return (object)$labels;