[wp-trac] [WordPress Trac] #52007: sticky_posts somehow ends up with duplicate IDs and unstickying only removes one at a time
WordPress Trac
noreply at wordpress.org
Wed Feb 17 22:56:49 UTC 2021
#52007: sticky_posts somehow ends up with duplicate IDs and unstickying only
removes one at a time
---------------------------------------------+----------------------------
Reporter: archon810 | Owner: peterwilsoncc
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.7
Component: Posts, Post Types | Version: 5.5.3
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+----------------------------
Changes (by peterwilsoncc):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"50380" 50380]:
{{{
#!CommitTicketReference repository="" revision="50380"
Posts/Post Types: Prevent duplicates in sticky posts option.
In `unstick_post()` if a post ID is duplicated in the `sticky_posts`
option remove all instances.
In both `stick_post()` and `unstick_post()` check for duplicate IDs
already stored in the `sticky_post` option and remove them if the option
is updated.
Props rahmohn, archon810.
Fixes #52007.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52007#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list