Changeset 8102
- Timestamp:
- 06/16/2008 08:44:30 PM (17 years ago)
- Location:
- branches/2.5/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/wp-admin/edit-page-form.php
r7795 r8102 69 69 70 70 <div class="inside"> 71 72 71 <p><strong><?php _e('Publish Status') ?></strong></p> 73 72 <p> 74 73 <select name='post_status' tabindex='4'> 75 <?php if ( current_user_can('publish_pages') ) : ?> 74 <?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages') 75 // 'publish' option will be selected for published AND private posts (checkbox overrides dropdown) 76 if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : 77 ?> 76 78 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 77 <?php else: ?>78 <option<?php selected( $post->post_status, 'private' ); ?> value='private'><?php _e('Published') ?></option>79 79 <?php endif; ?> 80 80 <?php if ( 'future' == $post->post_status ) : ?> … … 85 85 </select> 86 86 </p> 87 87 <?php if ( current_user_can( 'publish_posts' ) ) : ?> 88 88 <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 page private') ?></label></p> 89 <?php endif; ?> 90 89 91 <?php 90 92 if ($post_ID) { -
branches/2.5/wp-admin/includes/post.php
r7637 r8102 63 63 if ( 'page' == $_POST['post_type'] ) { 64 64 if ('publish' == $_POST['post_status'] && !current_user_can( 'publish_pages' )) 65 $_POST['post_status'] = 'pending'; 65 if ( $previous_status != 'publish' OR !current_user_can( 'edit_published_pages') ) 66 $_POST['post_status'] = 'pending'; 66 67 } else { 67 68 if ('publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' ))
Note: See TracChangeset
for help on using the changeset viewer.