Make WordPress Core


Ignore:
Timestamp:
05/05/2009 02:14:25 AM (16 years ago)
Author:
azaozz
Message:

Some cleanup for edit-page-form.php and edit-form-advanced.php, props simek, fixes #9501

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-page-form.php

    r11180 r11183  
    9999
    100100<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">
    102102<?php
    103103switch ( $post->post_status ) {
     
    119119}
    120120?>
    121 </span></b>
     121</span>
    122122<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
    123123<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>
     
    145145
    146146<div class="misc-pub-section " id="visibility">
    147 <?php _e('Visibility:'); ?> <b><span id="post-visibility-display"><?php
     147<?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php
    148148
    149149if ( 'private' == $post->post_status ) {
     
    159159}
    160160
    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>
     161echo 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>
    162164
    163165<div id="post-visibility-select" class="hide-if-js">
    164166<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attr($post->post_password); ?>" />
    165167<input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo attr( $visibility ); ?>" />
    166 
    167168
    168169<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 />
     
    171172<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 />
    172173
    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>
    177176</div>
    178177<?php } ?>
     
    200199    $date = date_i18n( $datef, strtotime( current_time('mysql') ) );
    201200}
    202 ?>
    203 <?php if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
     201
     202if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
    204203<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>
    207205    <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
    208206    <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div>
    209 </div><?php // /misc-pub-section ?>
    210 <?php endif; ?>
     207</div><?php // /misc-pub-section
     208endif; ?>
    211209
    212210</div>
     
    226224<?php
    227225if ( !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' ) ) : ?>
    230229        <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Schedule') ?>" />
    231230        <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Schedule') ?>" />
    232     <?php else : ?>
     231<?php   else : ?>
    233232        <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Publish') ?>" />
    234233        <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Publish') ?>" />
    235     <?php endif; ?>
    236 <?php else : ?>
     234<?php   endif;
     235    else : ?>
    237236    <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" />
    238237    <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 { ?>
    241241    <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Page') ?>" />
    242242    <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Page') ?>" />
    243 <?php } ?>
     243<?php
     244} ?>
    244245</div>
    245246<div class="clear"></div>
     
    281282<p><?php _e('You can arrange your pages in hierarchies, for example you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
    282283<?php
    283     if ( 0 != count( get_page_templates() ) ) {
    284 ?>
     284    if ( 0 != count( get_page_templates() ) ) { ?>
    285285<h5><?php _e('Template') ?></h5>
    286286<label class="invisible" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
     
    290290<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&#8217;ll see them above.'); ?></p>
    291291<?php
    292     }
    293 ?>
     292    } ?>
    294293<h5><?php _e('Order') ?></h5>
    295294<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>
     
    310309<div id="postcustomstuff">
    311310<?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>
    317315</div>
    318316<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>
     
    429427
    430428<div id="side-info-column" class="inner-sidebar">
    431 
    432 <?php
    433 
     429<?php
    434430do_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); ?>
    438432</div>
    439433
     
    476470</tr></tbody></table>
    477471
    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
     473wp_nonce_field( 'autosave', 'autosavenonce', false );
     474wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
     475wp_nonce_field( 'getpermalink', 'getpermalinknonce', false );
     476wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
     477wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
     478</div>
     479
     480<?php
    487481do_meta_boxes('page', 'normal', $post);
    488482do_action('edit_page_form');
    489483do_meta_boxes('page', 'advanced', $post);
    490 
    491484?>
    492485
Note: See TracChangeset for help on using the changeset viewer.