Changes from trunk/wp-admin/includes/meta-boxes.php at r17322 to branches/3.0/wp-admin/includes/meta-boxes.php at r15452
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-admin/includes/meta-boxes.php
r17322 r15452 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 < ?php submit_button( __( 'Save' ), 'button', 'save' ); ?>25 <input type="submit" name="save" value="<?php esc_attr_e('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="" />36 35 </div> 37 36 … … 39 38 <?php 40 39 if ( 'publish' == $post->post_status ) { 41 $preview_link = esc_url( get_permalink( $post->ID ));42 $preview_button = __( 'Preview Changes');40 $preview_link = esc_url(get_permalink($post->ID)); 41 $preview_button = __('Preview Changes'); 43 42 } else { 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' ); 43 $preview_link = esc_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); 44 $preview_button = __('Preview'); 49 45 } 50 46 ?> … … 77 73 case 'auto-draft': 78 74 _e('Draft'); 75 break; 76 case 'auto-draft': 77 _e('Unsaved'); 79 78 break; 80 79 } … … 155 154 </div><?php // /misc-pub-section ?> 156 155 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' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" />207 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" id="ajax-loading" style="visibility:hidden;" 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 < ?php submit_button( __( 'Schedule' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>213 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Schedule') ?>" /> 214 214 <?php else : ?> 215 215 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" /> 216 < ?php submit_button( __( 'Publish' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>216 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Publish') ?>" /> 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 < ?php submit_button( __( 'Submit for Review' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>220 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Submit for Review') ?>" /> 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.0240 *241 * @param object $post242 */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 it253 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;263 234 } 264 235 … … 286 257 <div class="nojs-tags hide-if-js"> 287 258 <p><?php echo $taxonomy->labels->add_or_remove_items; ?></p> 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>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> 289 260 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?> 290 261 <div class="ajaxtag hide-if-no-js"> … … 301 272 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?> 302 273 <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> 303 276 <?php endif; ?> 304 277 <?php … … 344 317 </ul> 345 318 </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; ?> 346 322 <?php if ( current_user_can($tax->cap->edit_terms) ) : ?> 347 323 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children"> … … 381 357 function post_excerpt_meta_box($post) { 382 358 ?> 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>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> 384 360 <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> 385 361 <?php … … 448 424 <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 /> 449 425 <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); ?>451 426 </p> 452 427 <?php … … 458 433 * @since 3.0.0 459 434 * 460 * @param array$result table header rows461 * @return array435 * @param $result table header rows 436 * @return 462 437 */ 463 438 function post_comment_meta_box_thead($result) { … … 484 459 485 460 wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); 486 487 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); 488 $wp_list_table->display( true ); 489 ?> 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> 490 470 <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> 491 471 <?php … … 495 475 <?php 496 476 } 477 remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead'); 497 478 wp_comment_trashnotice(); 498 479 } … … 522 503 function post_author_meta_box($post) { 523 504 global $user_ID; 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 ) ); 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 533 511 } 534 512 … … 601 579 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> 602 580 <div style="display:none;"> 603 < ?php submit_button( __( 'Save' ), 'button', 'save', false ); ?>581 <input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" /> 604 582 </div> 605 583 … … 885 863 <tr class="form-field"> 886 864 <th valign="top" scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th> 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>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> 888 866 </tr> 889 867 <tr class="form-field">
Note: See TracChangeset
for help on using the changeset viewer.