Changeset 11183
- Timestamp:
- 05/05/2009 02:14:25 AM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 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> -
trunk/wp-admin/edit-page-form.php
r11180 r11183 99 99 100 100 <div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label> 101 < b><span id="post-status-display">101 <span id="post-status-display"> 102 102 <?php 103 103 switch ( $post->post_status ) { … … 119 119 } 120 120 ?> 121 </span> </b>121 </span> 122 122 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> 123 123 <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> … … 145 145 146 146 <div class="misc-pub-section " id="visibility"> 147 <?php _e('Visibility:'); ?> < b><span id="post-visibility-display"><?php147 <?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php 148 148 149 149 if ( 'private' == $post->post_status ) { … … 159 159 } 160 160 161 ?><?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> 161 echo wp_specialchars( $visibility_trans ); ?></span> 162 <?php if ( $can_publish ) { ?> 163 <a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a> 162 164 163 165 <div id="post-visibility-select" class="hide-if-js"> 164 166 <input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attr($post->post_password); ?>" /> 165 167 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo attr( $visibility ); ?>" /> 166 167 168 168 169 <input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br /> … … 171 172 <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br /> 172 173 173 <p> 174 <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a> 175 <a href="#visibility" class="cancel-post-visibility hide-if-no-js"><?php _e('Cancel'); ?></a> 176 </p> 174 <p><a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a> 175 <a href="#visibility" class="cancel-post-visibility hide-if-no-js"><?php _e('Cancel'); ?></a></p> 177 176 </div> 178 177 <?php } ?> … … 200 199 $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); 201 200 } 202 ?> 203 <?phpif ( $can_publish ) : // Contributors don't get to choose the date of publish ?>201 202 if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> 204 203 <div class="misc-pub-section curtime misc-pub-section-last"> 205 <span id="timestamp"> 206 <?php printf($stamp, $date); ?></span> 204 <span id="timestamp"><?php printf($stamp, $date); ?></span> 207 205 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 208 206 <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div> 209 </div><?php // /misc-pub-section ?>210 <?phpendif; ?>207 </div><?php // /misc-pub-section 208 endif; ?> 211 209 212 210 </div> … … 226 224 <?php 227 225 if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?> 228 <?php if ( $can_publish ) : ?> 229 <?php if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 226 <?php 227 if ( $can_publish ) : 228 if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 230 229 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Schedule') ?>" /> 231 230 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Schedule') ?>" /> 232 <?phpelse : ?>231 <?php else : ?> 233 232 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Publish') ?>" /> 234 233 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Publish') ?>" /> 235 <?php endif; ?> 236 <?phpelse : ?>234 <?php endif; 235 else : ?> 237 236 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" /> 238 237 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Submit for Review') ?>" /> 239 <?php endif; ?> 240 <?php } else { ?> 238 <?php 239 endif; 240 } else { ?> 241 241 <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Page') ?>" /> 242 242 <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Page') ?>" /> 243 <?php } ?> 243 <?php 244 } ?> 244 245 </div> 245 246 <div class="clear"></div> … … 281 282 <p><?php _e('You can arrange your pages in hierarchies, for example you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how deeply nested you can make pages.'); ?></p> 282 283 <?php 283 if ( 0 != count( get_page_templates() ) ) { 284 ?> 284 if ( 0 != count( get_page_templates() ) ) { ?> 285 285 <h5><?php _e('Template') ?></h5> 286 286 <label class="invisible" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template"> … … 290 290 <p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them above.'); ?></p> 291 291 <?php 292 } 293 ?> 292 } ?> 294 293 <h5><?php _e('Order') ?></h5> 295 294 <p><label class="invisible" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo attr($post->menu_order) ?>" /></p> … … 310 309 <div id="postcustomstuff"> 311 310 <?php 312 $metadata = has_meta($post->ID); 313 list_meta($metadata); 314 meta_form(); 315 ?> 316 <div id="ajax-response"></div> 311 $metadata = has_meta($post->ID); 312 list_meta($metadata); 313 meta_form(); ?> 314 <div id="ajax-response"></div> 317 315 </div> 318 316 <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> … … 429 427 430 428 <div id="side-info-column" class="inner-sidebar"> 431 432 <?php 433 429 <?php 434 430 do_action('submitpage_box'); 435 $side_meta_boxes = do_meta_boxes('page', 'side', $post); 436 437 ?> 431 $side_meta_boxes = do_meta_boxes('page', 'side', $post); ?> 438 432 </div> 439 433 … … 476 470 </tr></tbody></table> 477 471 478 <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>479 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 480 <?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?> 481 <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?> 482 <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> 483 </div>484 485 <?php 486 472 <?php 473 wp_nonce_field( 'autosave', 'autosavenonce', false ); 474 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); 475 wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); 476 wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); 477 wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> 478 </div> 479 480 <?php 487 481 do_meta_boxes('page', 'normal', $post); 488 482 do_action('edit_page_form'); 489 483 do_meta_boxes('page', 'advanced', $post); 490 491 484 ?> 492 485 -
trunk/wp-admin/wp-admin.css
r11172 r11183 308 308 #sticky-span { 309 309 margin-left: 18px; 310 } 311 312 #post-status-display, 313 #post-visibility-display { 314 font-weight: bold; 310 315 } 311 316
Note: See TracChangeset
for help on using the changeset viewer.