Make WordPress Core

Ticket #29999: 29999.patch

File 29999.patch, 2.1 KB (added by deconf, 10 years ago)
  • wp-admin/edit-form-advanced.php

     
    235235if ( ( 'publish' == get_post_status( $post ) || 'private' == get_post_status( $post ) ) && post_type_supports($post_type, 'comments') )
    236236        add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', null, 'normal', 'core');
    237237
    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');
     238add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core');
    240239
    241240if ( post_type_supports($post_type, 'author') ) {
    242241        if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) )
     
    501500if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) )
    502501    $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button button-small" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';
    503502
    504 if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) {
     503if ( $post_type_object->public ) {
    505504        $has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status;
    506505?>
    507506        <div id="edit-slug-box" class="hide-if-no-js">
  • wp-includes/post.php

     
    31913191                }
    31923192        }
    31933193
    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 
    31993194        /*
    32003195         * Create a valid post name. Drafts and pending posts are allowed to have
    32013196         * an empty post name.