Changes from branches/3.0/wp-admin/includes/meta-boxes.php at r15452 to trunk/wp-admin/includes/meta-boxes.php at r17322
- File:
-
- 1 edited
-
trunk/wp-admin/includes/meta-boxes.php (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r15452 r17322 23 23 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> 24 24 <div style="display:none;"> 25 < input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />25 <?php submit_button( __( 'Save' ), 'button', 'save' ); ?> 26 26 </div> 27 27 … … 33 33 <input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" /> 34 34 <?php } ?> 35 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="draft-ajax-loading" alt="" /> 35 36 </div> 36 37 … … 38 39 <?php 39 40 if ( 'publish' == $post->post_status ) { 40 $preview_link = esc_url( get_permalink($post->ID));41 $preview_button = __( 'Preview Changes');41 $preview_link = esc_url( get_permalink( $post->ID ) ); 42 $preview_button = __( 'Preview Changes' ); 42 43 } else { 43 $preview_link = esc_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); 44 $preview_button = __('Preview'); 44 $preview_link = get_permalink( $post->ID ); 45 if ( is_ssl() ) 46 $preview_link = str_replace( 'http://', 'https://', $preview_link ); 47 $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); 48 $preview_button = __( 'Preview' ); 45 49 } 46 50 ?> … … 73 77 case 'auto-draft': 74 78 _e('Draft'); 75 break;76 case 'auto-draft':77 _e('Unsaved');78 79 break; 79 80 } … … 154 155 </div><?php // /misc-pub-section ?> 155 156 156 157 157 <?php 158 158 // translators: Publish box date formt, see http://php.net/date … … 205 205 206 206 <div id="publishing-action"> 207 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" id="ajax-loading" style="visibility:hidden;" alt="" />207 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" /> 208 208 <?php 209 209 if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { … … 211 211 if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 212 212 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" /> 213 < input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Schedule') ?>" />213 <?php submit_button( __( 'Schedule' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?> 214 214 <?php else : ?> 215 215 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" /> 216 < input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Publish') ?>" />216 <?php submit_button( __( 'Publish' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?> 217 217 <?php endif; 218 218 else : ?> 219 219 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" /> 220 < input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Submit for Review') ?>" />220 <?php submit_button( __( 'Submit for Review' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?> 221 221 <?php 222 222 endif; … … 232 232 233 233 <?php 234 } 235 236 /** 237 * Display post format form elements. 238 * 239 * @since 3.1.0 240 * 241 * @param object $post 242 */ 243 function post_format_meta_box( $post, $box ) { 244 if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) : 245 $post_formats = get_theme_support( 'post-formats' ); 246 247 if ( is_array( $post_formats[0] ) ) : 248 $post_format = get_post_format( $post->ID ); 249 if ( !$post_format ) 250 $post_format = '0'; 251 $post_format_display = get_post_format_string( $post_format ); 252 // Add in the current one if it isn't there yet, in case the current theme doesn't support it 253 if ( $post_format && !in_array( $post_format, $post_formats[0] ) ) 254 $post_formats[0][] = $post_format; 255 ?> 256 <div id="post-formats-select"> 257 <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> 258 <?php foreach ( $post_formats[0] as $format ) : ?> 259 <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> 260 <?php endforeach; ?><br /> 261 </div> 262 <?php endif; endif; 234 263 } 235 264 … … 257 286 <div class="nojs-tags hide-if-js"> 258 287 <p><?php echo $taxonomy->labels->add_or_remove_items; ?></p> 259 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php echo $disabled; ?>><?php echo esc_attr(get_terms_to_edit( $post->ID, $tax_name ));?></textarea></div>288 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php echo $disabled; ?>><?php echo get_terms_to_edit( $post->ID, $tax_name ); // textarea_escaped by esc_attr() ?></textarea></div> 260 289 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?> 261 290 <div class="ajaxtag hide-if-no-js"> … … 272 301 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?> 273 302 <p class="hide-if-no-js"><a href="#titlediv" class="tagcloud-link" id="link-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->choose_from_most_used; ?></a></p> 274 <?php else : ?>275 <p><em><?php _e('You cannot modify this taxonomy.'); ?></em></p>276 303 <?php endif; ?> 277 304 <?php … … 317 344 </ul> 318 345 </div> 319 <?php if ( !current_user_can($tax->cap->assign_terms) ) : ?>320 <p><em><?php _e('You cannot modify this taxonomy.'); ?></em></p>321 <?php endif; ?>322 346 <?php if ( current_user_can($tax->cap->edit_terms) ) : ?> 323 347 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children"> … … 357 381 function post_excerpt_meta_box($post) { 358 382 ?> 359 <label class="screen-reader-text" for="excerpt"><?php _e('Excerpt') ?></label><textarea rows="1" cols="40" name="excerpt" tabindex="6" id="excerpt"><?php echo $post->post_excerpt ?></textarea>383 <label class="screen-reader-text" for="excerpt"><?php _e('Excerpt') ?></label><textarea rows="1" cols="40" name="excerpt" tabindex="6" id="excerpt"><?php echo $post->post_excerpt; // textarea_escaped ?></textarea> 360 384 <p><?php _e('Excerpts are optional hand-crafted summaries of your content that can be used in your theme. <a href="http://codex.wordpress.org/Excerpt" target="_blank">Learn more about manual excerpts.</a>'); ?></p> 361 385 <?php … … 424 448 <label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> <?php _e( 'Allow comments.' ) ?></label><br /> 425 449 <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php printf( __( 'Allow <a href="%s" target="_blank">trackbacks and pingbacks</a> on this page.' ), __( 'http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' ) ); ?></label> 450 <?php do_action('post_comment_status_meta_box-options', $post); ?> 426 451 </p> 427 452 <?php … … 433 458 * @since 3.0.0 434 459 * 435 * @param $result table header rows436 * @return 460 * @param array $result table header rows 461 * @return array 437 462 */ 438 463 function post_comment_meta_box_thead($result) { … … 459 484 460 485 wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); 461 add_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead', 8, 1); 462 ?> 463 464 <table class="widefat comments-box fixed" cellspacing="0" style="display:none;"> 465 <thead><tr> 466 <?php print_column_headers('edit-comments'); ?> 467 </tr></thead> 468 <tbody id="the-comment-list" class="list:comment"></tbody> 469 </table> 486 487 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); 488 $wp_list_table->display( true ); 489 ?> 470 490 <p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p> 471 491 <?php … … 475 495 <?php 476 496 } 477 remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead');478 497 wp_comment_trashnotice(); 479 498 } … … 503 522 function post_author_meta_box($post) { 504 523 global $user_ID; 505 $authors = get_editable_user_ids( get_current_user_id(), true, $post->post_type ); // TODO: ROLE SYSTEM 506 if ( $post->post_author && !in_array($post->post_author, $authors) ) 507 $authors[] = $post->post_author; 508 ?> 509 <label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> 510 <?php 524 ?> 525 <label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label> 526 <?php 527 wp_dropdown_users( array( 528 'who' => 'authors', 529 'name' => 'post_author_override', 530 'selected' => empty($post->ID) ? $user_ID : $post->post_author, 531 'include_selected' => true 532 ) ); 511 533 } 512 534 … … 579 601 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> 580 602 <div style="display:none;"> 581 < input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />603 <?php submit_button( __( 'Save' ), 'button', 'save', false ); ?> 582 604 </div> 583 605 … … 863 885 <tr class="form-field"> 864 886 <th valign="top" scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th> 865 <td><textarea name="link_notes" id="link_notes" cols="50" rows="10" style="width: 95%"><?php echo ( isset( $link->link_notes ) ? $link->link_notes : '');?></textarea></td>887 <td><textarea name="link_notes" id="link_notes" cols="50" rows="10" style="width: 95%"><?php echo ( isset( $link->link_notes ) ? $link->link_notes : ''); // textarea_escaped ?></textarea></td> 866 888 </tr> 867 889 <tr class="form-field">
Note: See TracChangeset
for help on using the changeset viewer.