[wp-trac] [WordPress Trac] #24153: Sticky flag gets unset if author doesn't have publish_posts permission
WordPress Trac
noreply at wordpress.org
Sun Jun 28 14:06:32 UTC 2015
#24153: Sticky flag gets unset if author doesn't have publish_posts permission
---------------------------------+-----------------------------
Reporter: archon810 | Owner: chriscct7
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.3
Component: Role/Capability | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch has-tests | Focuses: administration
---------------------------------+-----------------------------
Changes (by ericmann):
* keywords: has-patch needs-unit-tests => has-patch has-tests
Comment:
I wrote a test that replicates the reported behavior with both
`wp_update_post` and `edit_post`:
- User with `edit_others_posts` but lacking `publish_posts` edits a sticky
post
- Make sure the post is still sticky after it's been edited
As things turn out, the `wp_update_post` routine worked just fine without
any changes - it's merely the presence of the `$_POST` array that mucked
things up in `edit_post`. I've added tests for both update/save routines
just to be sure nothing breaks.
My new patch also refreshes the existing patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24153#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list