Make WordPress Core


Ignore:
Timestamp:
03/14/2005 12:48:11 AM (21 years ago)
Author:
ryan
Message:

Don't let users who cannot publish edit published posts, even their own. Make consistent use of user_can_create_post(). http://mosquito.wordpress.org/view.php?id=1004 Props: MC_incubus

File:
1 edited

Legend:

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

    r2413 r2441  
    116116if ('publish' != $post_status || 0 == $post_ID) {
    117117?>
    118 <?php if ( 1 < $user_level || (1 == $user_level && 2 == get_option('new_users_can_blog')) ) : ?>
     118<?php if ( user_can_create_post($user_ID) ) : ?>
    119119    <input name="publish" type="submit" id="publish" tabindex="10" value="<?php _e('Publish') ?>" />
    120120<?php endif; ?>
     
    136136    <tr>
    137137        <th scope="row" valign="top"><?php _e('Post Status') ?>:</th>
    138         <td><?php if ( 1 < $user_level || (1 == $user_level && 2 == get_option('new_users_can_blog')) ) : ?>
     138        <td><?php if ( user_can_create_post($user_ID) ) : ?>
    139139<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post_status, 'publish'); ?> /> <?php _e('Published') ?></label><br />
    140140<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.