[wp-trac] [WordPress Trac] #48954: "Sticky" post state shows even for non-Post post-types

WordPress Trac noreply at wordpress.org
Thu Oct 9 13:03:38 UTC 2025


#48954: "Sticky" post state shows even for non-Post post-types
-------------------------------------------------+-------------------------
 Reporter:  johnjamesjacoby                      |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Posts, Post Types                    |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-patch good-first-bug has-      |     Focuses:
  test-info                                      |  administration
-------------------------------------------------+-------------------------

Comment (by igorradovanov):

 Hey @SirLouen,

 I'd like to publish a patch for this issue, as I've been testing this bug
 for quite a while.

 Here's what I propose:
 * Add `'sticky'` to the Post Type Support API (similar to how we handle
 comments and thumbnails).
 * Update `is_sticky()` to check `post_type_supports()`.
 * Replace the 4 hardcoded checks scattered across core (`get_inline_data`,
 `post_submit_meta_box`, `get_post_states`, `XML-RPC`) with a centralized
 support check. Did I miss any other places that might need this change?
 * Add cleanup hooks (`save_post` and `transition_post_status`) to
 automatically remove the sticky status when the post type changes or when
 saving a post whose type doesn't support sticky.
 * By default, only the `'post'` type supports sticky (for backward
 compatibility).

 This aligns with the architectural direction mentioned by @johnjamesjacoby
 and helps prevent data integrity issues. Custom post types could opt in if
 needed.

 Sound good? Any concerns before I start on the patch?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48954#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list