Changeset 11183 for trunk/wp-admin/edit-form-advanced.php
- Timestamp:
- 05/05/2009 02:14:25 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r11180 r11183 105 105 106 106 <div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label> 107 < b><span id="post-status-display">107 <span id="post-status-display"> 108 108 <?php 109 109 switch ( $post->post_status ) { … … 125 125 } 126 126 ?> 127 </span> </b>127 </span> 128 128 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> 129 129 <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> … … 150 150 151 151 <div class="misc-pub-section " id="visibility"> 152 <?php _e('Visibility:'); ?> < b><span id="post-visibility-display"><?php152 <?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php 153 153 154 154 if ( 'private' == $post->post_status ) { … … 167 167 } 168 168 169 ?><?php echo wp_specialchars( $visibility_trans ); ?></span> </b><?php if ( $can_publish ) { ?> <a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a>169 ?><?php echo wp_specialchars( $visibility_trans ); ?></span> <?php if ( $can_publish ) { ?> <a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a> 170 170 171 171 <div id="post-visibility-select" class="hide-if-js"> … … 211 211 $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); 212 212 } 213 ?> 214 <?phpif ( $can_publish ) : // Contributors don't get to choose the date of publish ?>213 214 if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> 215 215 <div class="misc-pub-section curtime misc-pub-section-last"> 216 216 <span id="timestamp"> … … 236 236 <div id="publishing-action"> 237 237 <?php 238 if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?>239 <?php if ( current_user_can('publish_posts') ) : ?> 240 <?phpif ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>238 if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { 239 if ( current_user_can('publish_posts') ) : 240 if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 241 241 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Schedule') ?>" /> 242 242 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Schedule') ?>" /> 243 <?phpelse : ?>243 <?php else : ?> 244 244 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Publish') ?>" /> 245 245 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Publish') ?>" /> 246 <?php endif; ?> 247 <?php else : ?> 248 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" /> 249 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Submit for Review') ?>" /> 250 <?php endif; ?> 251 <?php } else { ?> 252 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Post') ?>" /> 253 <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Post') ?>" /> 254 <?php } ?> 246 <?php endif; 247 else : ?> 248 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" /> 249 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Submit for Review') ?>" /> 250 <?php 251 endif; 252 } else { ?> 253 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Post') ?>" /> 254 <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Post') ?>" /> 255 <?php 256 } ?> 255 257 </div> 256 258 <div class="clear"></div> … … 318 320 <div id="categories-pop" class="ui-tabs-panel" style="display: none;"> 319 321 <ul id="categorychecklist-pop" class="categorychecklist form-no-clear" > 320 322 <?php $popular_ids = wp_popular_terms_checklist('category'); ?> 321 323 </ul> 322 324 </div> … … 324 326 <div id="categories-all" class="ui-tabs-panel"> 325 327 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 326 328 <?php wp_category_checklist($post->ID, false, false, $popular_ids) ?> 327 329 </ul> 328 330 </div> … … 332 334 <h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4> 333 335 <p id="category-add" class="wp-hidden-child"> 334 <label class="invisible" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _ea( 'New category name' ); ?>" tabindex="3" aria-required="true"/> 335 <label class="invisible" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> 336 <input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _ea( 'Add' ); ?>" tabindex="3" /> 337 <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?> 338 <span id="category-ajax-response"></span> 339 </p> 336 <label class="invisible" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _ea( 'New category name' ); ?>" tabindex="3" aria-required="true"/> 337 <label class="invisible" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> 338 <input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _ea( 'Add' ); ?>" tabindex="3" /> 339 <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?> 340 <span id="category-ajax-response"></span></p> 340 341 </div> 341 342 <?php … … 354 355 function post_password_meta_box($post) { 355 356 ?> 356 <p> 357 <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label> 358 </p> 357 <p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label></p> 359 358 <h4><?php _e( 'Post Password' ); ?></h4> 360 359 <p><label class="invisible" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php the_post_password(); ?>" /></p> … … 420 419 $metadata = has_meta($post->ID); 421 420 list_meta($metadata); 422 meta_form(); 423 ?> 421 meta_form(); ?> 424 422 </div> 425 423 <p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p> … … 442 440 <p class="meta-options"> 443 441 <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 on this post') ?></label><br /> 444 <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a> on this post') ?></label> 445 </p> 442 <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a> on this post') ?></label></p> 446 443 <?php 447 444 } … … 469 466 470 467 <table class="widefat comments-box fixed" cellspacing="0" style="display:none;"> 471 <thead> 472 <tr> 468 <thead><tr> 473 469 <th scope="col" class="column-author"><?php _e('Author') ?></th> 474 470 <th scope="col" class="column-comment"> 475 <?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?> 476 </th> 477 </tr> 478 </thead> 479 <tbody id="the-comment-list" class="list:comment"> 480 </tbody> 471 <?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?></th> 472 </tr></thead> 473 <tbody id="the-comment-list" class="list:comment"></tbody> 481 474 </table> 482 475 <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="images/wpspin.gif" alt="" /></p> … … 581 574 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo attr($post->post_status) ?>" /> 582 575 <input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" /> 583 <?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?> 584 585 <?php echo $form_extra ?> 576 <?php 577 if ( 'draft' != $post->post_status ) 578 wp_original_referer_field(true, 'previous'); 579 580 echo $form_extra ?> 586 581 587 582 <div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>"> 588 589 583 <div id="side-info-column" class="inner-sidebar"> 590 584 … … 602 596 </div> 603 597 <div class="inside"> 604 <?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?> 605 <?php if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) ) { ?> 598 <?php 599 $sample_permalink_html = get_sample_permalink_html($post->ID); 600 if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) ) { ?> 606 601 <div id="edit-slug-box"> 607 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 608 echo $sample_permalink_html; 602 <?php 603 if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 604 echo $sample_permalink_html; 609 605 endif; ?> 610 606 </div> 611 <?php } ?> 607 <?php 608 } ?> 612 609 </div> 613 610 </div> … … 631 628 } 632 629 echo '</span>'; 633 } 634 ?> 630 } ?> 635 631 </td> 636 632 </tr></tbody></table> 637 633 638 639 <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?> 640 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 641 <?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?> 642 <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?> 643 <?phpwp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>634 <?php 635 wp_nonce_field( 'autosave', 'autosavenonce', false ); 636 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); 637 wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); 638 wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); 639 wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> 644 640 </div> 645 641 … … 652 648 do_meta_boxes('post', 'advanced', $post); 653 649 654 do_action('dbx_post_sidebar'); 655 656 ?> 650 do_action('dbx_post_sidebar'); ?> 657 651 658 652 </div>
Note: See TracChangeset
for help on using the changeset viewer.