Make WordPress Core


Ignore:
Timestamp:
10/02/2008 04:10:54 AM (16 years ago)
Author:
markjaquith
Message:

Do not allow contributors to set the post slug for pending review posts. fixes #7805

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r9054 r9055  
    375375<?php
    376376}
    377 add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'normal', 'core');
     377if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) )
     378    add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'normal', 'core');
    378379
    379380$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
     
    482483<div class="inside">
    483484<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
     485<?php if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) ) { ?>
    484486    <div id="edit-slug-box">
    485487<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
     
    487489endif; ?>
    488490    </div>
     491<?php } ?>
    489492</div>
    490493</div>
Note: See TracChangeset for help on using the changeset viewer.