Changeset 8889 for trunk/wp-admin/edit-page-form.php
- Timestamp:
- 09/14/2008 12:58:00 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-page-form.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-page-form.php
r8883 r8889 58 58 function page_submit_meta_box($post) { 59 59 global $action; 60 61 $can_publish = current_user_can('publish_pages'); 60 62 ?> 61 63 <div class="submitbox" id="submitpage"> … … 63 65 <div class="inside-submitbox"> 64 66 65 < p><label for='post_status'><?php _e('This postis') ?></label>67 <div class="insidebox"><label for='post_status'><?php _e('This page is') ?></label> 66 68 <strong><span id="post-status-display"> 67 69 <?php … … 83 85 ?> 84 86 </span></strong> 87 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { ?> 85 88 <a href="#edit_post_status" class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 86 </p> 87 88 <p id='post-status-select' class="hide-if-js"> 89 90 <div id="post-status-select" class="hide-if-js"> 91 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo $post->post_status; ?>" /> 92 <?php _e('Change page status'); ?><br /> 89 93 <select name='post_status' id='post_status' tabindex='4'> 90 94 <?php 91 95 // 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) 92 if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : ?> 93 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { ?> 96 if ( $can_publish OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : ?> 94 97 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 95 <?php } ?>96 98 <?php if ( 'future' == $post->post_status ) : ?> 97 99 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option> … … 101 103 <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option> 102 104 </select> 103 </p> 105 <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a> 106 <a href="#post_status" class="cancel-post-status hide-if-no-js"><?php _e('Cancel'); ?></a> 107 </div> 108 </div> 109 110 <?php } else { ?> 111 </div> 112 113 <?php if ( $can_publish && 'pending' != $post->post_status ) { ?> 114 <div class="insidebox"><input name="pending" type="submit" class="button" id="pending" tabindex="6" accesskey="r" value="<?php _e('Submit for Review') ?>" /></div> 115 <?php } ?> 116 117 <?php } ?> 118 119 <?php if ( ('edit' == $action) && current_user_can('delete_page', $post->ID) ) { ?> 120 <div class="insidebox" id="deletebutton"><a class="submitdelete" href="<?php echo wp_nonce_url("page.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID); ?>" onclick="if ( confirm('<?php echo js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )); ?>') ) {return true;}return false;"><?php _e('Delete page'); ?></a></div> 121 <?php } ?> 104 122 105 123 <?php 106 124 if ( 0 != $post->ID ) { 107 125 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 108 $stamp = __('Scheduled for: <br />%1$s at %2$s');126 $stamp = __('Scheduled for: %1$s at %2$s'); 109 127 } else if ( 'publish' == $post->post_status ) { // already published 110 $stamp = __('Published on: <br />%1$s at %2$s');128 $stamp = __('Published on: %1$s at %2$s'); 111 129 } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified 112 130 $stamp = __('Publish immediately'); 113 131 } else { // draft, 1 or more saves, date specified 114 $stamp = __('Publish on: <br />%1$s at %2$s');132 $stamp = __('Publish on: %1$s at %2$s'); 115 133 } 116 134 $date = mysql2date(get_option('date_format'), $post->post_date); … … 122 140 } 123 141 ?> 124 <?php if ( current_user_can( 'publish_pages' )) : // Contributors don't get to choose the date of publish ?>125 < p class="curtime"><?php printf($stamp, $date, $time); ?>142 <?php if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> 143 <div class="insidebox curtime"><span id="timestamp"><?php printf($stamp, $date, $time); ?></span> 126 144 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a></p> 127 145 128 <div id= 'timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div>146 <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div></div> 129 147 <?php endif; ?> 130 148 … … 133 151 <p class="submit"> 134 152 <?php do_action('page_submitbox_start'); ?> 135 <input type="submit" name="save" class="button button-highlighted" value="<?php _e('Save'); ?>" tabindex="4" /> 153 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status ) 154 $savebtn = attribute_escape( __('Save') ); 155 else 156 $savebtn = attribute_escape( __('Save Draft') ); 157 ?> 158 <input type="submit" name="save" id="save-post" value="<?php echo $savebtn; ?>" tabindex="4" class="button button-highlighted" /> 136 159 137 160 <?php if ( 'publish' == $post->post_status ) { ?> 138 161 <a class="preview button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a> 139 162 <?php } else { ?> 140 <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>163 <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> 141 164 <?php } ?> 142 165 143 <?php if ( ('edit' == $action) && current_user_can('delete_page', $post->ID) ) 144 echo "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&post=$post->ID", 'delete-page_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete page') . "</a>"; 145 ?> 146 <br class="clear" /> 147 <?php 148 if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) { 149 ?> 166 <?php 167 if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) { ?> 150 168 <?php if ( current_user_can('publish_pages') ) : ?> 151 169 <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> … … 153 171 <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> 154 172 <?php endif; ?> 155 <?php 156 } 157 ?> 158 159 <!-- moved under the editor 160 <?php if ( 0 != $post->ID ) : ?> 161 <?php if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) { 162 $last_user = get_userdata($last_id); 163 printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 164 } else { 165 printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 166 } 167 ?> 168 <br class="clear" /> 169 <?php endif; ?> 170 --> 173 <?php } ?> 171 174 172 175 </p> 173 </div> 176 <div class="clear"></div> 177 </div> 178 174 179 <?php 175 180 }
Note: See TracChangeset
for help on using the changeset viewer.