Ticket #29999: 29999.patch
File 29999.patch, 2.1 KB (added by , 10 years ago) |
---|
-
wp-admin/edit-form-advanced.php
235 235 if ( ( 'publish' == get_post_status( $post ) || 'private' == get_post_status( $post ) ) && post_type_supports($post_type, 'comments') ) 236 236 add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', null, 'normal', 'core'); 237 237 238 if ( ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) 239 add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core'); 238 add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core'); 240 239 241 240 if ( post_type_supports($post_type, 'author') ) { 242 241 if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) … … 501 500 if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) ) 502 501 $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>'; 503 502 504 if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) )) {503 if ( $post_type_object->public ) { 505 504 $has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status; 506 505 ?> 507 506 <div id="edit-slug-box" class="hide-if-no-js"> -
wp-includes/post.php
3191 3191 } 3192 3192 } 3193 3193 3194 // Don't allow contributors to set the post slug for pending review posts.3195 if ( 'pending' == $post_status && !current_user_can( 'publish_posts' ) ) {3196 $post_name = '';3197 }3198 3199 3194 /* 3200 3195 * Create a valid post name. Drafts and pending posts are allowed to have 3201 3196 * an empty post name.