[wp-trac] [WordPress Trac] #31658: Press This: Users lacking the ability to publish should not see a Publish button
WordPress Trac
noreply at wordpress.org
Mon Mar 16 20:53:46 UTC 2015
#31658: Press This: Users lacking the ability to publish should not see a Publish
button
--------------------------+--------------------
Reporter: DrewAPicture | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: Press This | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: ui
--------------------------+--------------------
Comment (by stephdau):
Since `$_POST['status']` used in `WP_Press_This::save_post()` based on
having the `publish-button` class in the JS:
{{{
} else if ( $target.hasClass( 'publish-button' ) ) {
submitPost( 'publish' );
}}}
... that means the caption on the button is irrelevant to the process, and
can be switched to "Submit for review", and work as intended.
See [attachment:31658.2.diff]
Note that we also have more cap checks in `press-this.php` itself, for the
basic stuff.
{{{
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can(
get_post_type_object( 'post' )->cap->create_posts ) )
wp_die( __( 'Cheatin’ uh?' ), 403 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31658#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list