Changeset 9491 for trunk/wp-admin/edit-page-form.php
- Timestamp:
- 11/03/2008 07:06:36 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-page-form.php
r9468 r9491 65 65 66 66 <div id="minor-publishing"> 67 <div id="misc-publishing-actions">68 67 69 68 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> … … 72 71 </div> 73 72 74 <div id="misc-pub-block-1"> 75 <!-- 73 <div id="minor-publishing-actions"> 74 <div id="preview-action"> 75 <noscript> 76 <?php if ( 'publish' == $post->post_status ) { ?> 77 <a class="preview button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View Post'); ?></a> 78 <?php } else { ?> 79 <a class="preview button" href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview'); ?></a> 80 <?php } ?> 81 </noscript> 82 83 <a class="preview button hide-if-no-js" href="#" id="post-preview" tabindex="4"><?php _e('Preview'); ?></a> 84 <input type="hidden" name="wp-preview" id="wp-preview" value="" /> 85 </div> 86 87 <div id="save-action"> 88 <?php if ( 'publish' != $post->post_status && 'private' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 89 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save Draft') ); ?>" tabindex="4" class="button button-highlighted" /> 90 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 91 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save as Pending') ); ?>" tabindex="4" class="button button-highlighted" /> 92 <?php } ?> 93 </div> 94 <div class="clear"></div> 95 </div><?php // /minor-publishing-actions ?> 96 97 <div id="misc-publishing-actions"> 98 99 <?php if ( false ) { // Stub for 2.8 ?> 76 100 <div class="misc-pub-section misc-pub-section-1-last" id="visibility"> 77 101 <?php _e('Visibility:'); ?> <b><?php _e('Public'); // TODO: dropdown ?></b> 78 102 </div> 79 --> 80 </div> 81 <div id="misc-pub-block-2"> 82 <?php 83 $datef = _c( 'M j, Y \a\t G:i|Publish box date format'); 84 if ( 0 != $post->ID ) { 85 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 86 $stamp = __('Scheduled for:<br />%1$s'); 87 } else if ( 'publish' == $post->post_status ) { // already published 88 $stamp = __('Published on:<br />%1$s'); 89 } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified 90 $stamp = __('Publish immediately'); 91 } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified 92 $stamp = __('Schedule for:<br />%1$s'); 93 } else { // draft, 1 or more saves, date specified 94 $stamp = __('Publish on:<br />%1$s'); 95 } 96 $date = date_i18n( $datef, strtotime( $post->post_date ) ); 97 } else { // draft (no saves, and thus no date specified) 98 $stamp = __('Publish immediately'); 99 $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); 100 } 101 ?> 102 <?php if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> 103 <div class="misc-pub-section curtime"> 104 <span id="timestamp"> 105 <?php printf($stamp, $date); ?></span> 106 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 107 <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div> 108 </div> 109 <?php endif; ?> 110 111 <div class="misc-pub-section misc-pub-section-2-last"><label for="post_status"><?php _e('Status:') ?></label> 103 <?php } ?> 104 105 <div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label> 112 106 <b><span id="post-status-display"> 113 107 <?php … … 143 137 <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option> 144 138 </select> 145 <br /> 146 <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a> 147 <a href="#post_status" class="cancel-post-status hide-if-no-js"><?php _e('Cancel'); ?></a> 148 </div> 149 150 <?php } ?> 151 </div> 152 </div> 153 </div> 154 155 <div id="minor-publishing-actions"> 156 157 <?php if ( 'publish' != $post->post_status && 'private' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 158 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save Draft') ); ?>" tabindex="4" class="button button-highlighted" /> 159 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 160 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save Pending') ); ?>" tabindex="4" class="button button-highlighted" /> 161 <?php } ?> 162 163 <noscript> 164 <?php if ( 'publish' == $post->post_status ) { ?> 165 <a class="preview button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View Post'); ?></a> 166 <?php } else { ?> 167 <a class="preview button" href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview'); ?></a> 168 <?php } ?> 169 </noscript> 170 171 <a class="preview button hide-if-no-js" href="#" id="post-preview" tabindex="4"><?php _e('Preview'); ?></a> 172 <input type="hidden" name="wp-preview" id="wp-preview" value="" /> 139 140 <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a> 141 <a href="#post_status" class="cancel-post-status hide-if-no-js"><?php _e('Cancel'); ?></a> 142 </div> 143 144 <?php } ?> 145 </div><?php // /misc-pub-section ?> 146 147 <?php 148 $datef = _c( 'M j, Y @ G:i|Publish box date format'); 149 if ( 0 != $post->ID ) { 150 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 151 $stamp = __('Scheduled for: <b>%1$s</b>'); 152 } else if ( 'publish' == $post->post_status ) { // already published 153 $stamp = __('Published on: <b>%1$s</b>'); 154 } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified 155 $stamp = __('Publish <b>immediately</b>'); 156 } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified 157 $stamp = __('Schedule for: <b>%1$s</b>'); 158 } else { // draft, 1 or more saves, date specified 159 $stamp = __('Publish on: <b>%1$s</b>'); 160 } 161 $date = date_i18n( $datef, strtotime( $post->post_date ) ); 162 } else { // draft (no saves, and thus no date specified) 163 $stamp = __('Publish <b>immediately</b>'); 164 $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); 165 } 166 ?> 167 <?php if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> 168 <div class="misc-pub-section curtime misc-pub-section-last"> 169 <span id="timestamp"> 170 <?php printf($stamp, $date); ?></span> 171 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 172 <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div> 173 </div><?php // /misc-pub-section ?> 174 <?php endif; ?> 173 175 174 176 </div>
Note: See TracChangeset
for help on using the changeset viewer.