Changeset 9402 for trunk/wp-admin/edit-form-advanced.php
- Timestamp:
- 10/29/2008 07:22:56 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-form-advanced.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r9398 r9402 96 96 } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified 97 97 $stamp = __('Publish immediately'); 98 } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified 99 $stamp = __('Schedule for:<br />%1$s'); 98 100 } else { // draft, 1 or more saves, date specified 99 101 $stamp = __('Publish on:<br />%1$s'); … … 107 109 <?php if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> 108 110 <div class="misc-pub-section curtime"> 109 <span id="timestamp"><?php printf($stamp, $date); ?></span> 111 <span id="timestamp"> 112 <?php printf($stamp, $date); ?></span> 110 113 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 111 114 <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div> … … 133 136 ?> 134 137 </span></b> 135 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { ?>138 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> 136 139 <a href="#post_status" class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 137 140 138 141 <div id="post-status-select" class="hide-if-js"> 139 142 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo $post->post_status; ?>" /> 140 <br />141 143 <select name='post_status' id='post_status' tabindex='4'> 142 144 <?php 143 // only show the publish menu item if they are allowed to publish posts or they are allowed to edit this post (accounts for 'edit_published_posts' capability) 144 if ( $can_publish OR ( $post->post_status == 'publish' AND current_user_can('edit_post', $post->ID) ) ) : ?> 145 if ( $post->post_status == 'publish' ) : ?> 145 146 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 146 147 <?php if ( 'future' == $post->post_status ) : ?> … … 151 152 <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option> 152 153 </select> 153 154 <br /> 154 155 <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a> 155 156 <a href="#post_status" class="cancel-post-status hide-if-no-js"><?php _e('Cancel'); ?></a> … … 172 173 <div id="minor-publishing-actions"> 173 174 174 <?php if ( 'publish' != $post->post_status && 'private' != $post->post_status ) { ?>175 <?php if ( 'publish' != $post->post_status && 'private' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 175 176 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save Draft') ); ?>" tabindex="4" class="button button-highlighted" /> 177 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 178 <input type="submit" name="save" id="save-post" value="<?php echo attribute_escape( __('Save Pending') ); ?>" tabindex="4" class="button button-highlighted" /> 176 179 <?php } ?> 177 180 … … 198 201 if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) { ?> 199 202 <?php if ( current_user_can('publish_posts') ) : ?> 200 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 203 <?php if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 204 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Schedule') ?>" /> 205 <?php else : ?> 206 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 207 <?php endif; ?> 201 208 <?php else : ?> 202 209 <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" />
Note: See TracChangeset
for help on using the changeset viewer.