Make WordPress Core

Opened 9 years ago

Closed 4 years ago

Last modified 4 years ago

#37012 closed enhancement (duplicate)

Remove non hierarchical test for sticky in post table hidden fields

Reported by: nicolasrenard's profile nicolasrenard Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Posts, Post Types Keywords:
Focuses: administration Cc:

Description

When you enabled sticky feature for custom posts or pages, the checkbox in quick edit links for hierarchical post types (so like pages) doesn't work.

That's because there is a test on hierarchical type to add the sticky div (/wp-admin/includes/template.php:333).

Why such a test while there is an is_sticky() test inside ?

Is this test really useful ? I think it could be removed.

Attachments (1)

37012.patch (567 bytes) - added by nicolasrenard 9 years ago.

Download all attachments as: .zip

Change History (4)

@nicolasrenard
9 years ago

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.


4 years ago

#2 follow-up: @peterwilsoncc
4 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Hi @nicolasrenard

This was discussed in a triage session earlier today. I'm sorry it's taken so long for someone to get back to you.

Since your report, the condition has changed to display the sticky posts option only on the posts screen.

This was done in commit [16680] for ticket #12702.

As #12702 discusses whether custom post types should support sticky posts, I'm going to close this ticket of as a duplicate so discussion can remain in one place.

#3 in reply to: ↑ 2 @SergeyBiryukov
4 years ago

  • Component changed from Administration to Posts, Post Types
  • Focuses administration added

Replying to peterwilsoncc:

Since your report, the condition has changed to display the sticky posts option only on the posts screen.

This was done in commit [16680] for ticket #12702.

Just noting that [16680], while related, does not seem to affect this particular report, as that commit was done 10 years ago, and this ticket is from 5 years ago. That commit did not touch the get_inline_data() function: the line that the patch removes is still there as of WordPress 5.6.2.

We might want to replace the ! $post_type_object->hierarchical condition with 'post' === $post->post_type, for consistency with the similar checks in [16680].

If anyone thinks this is worth investigating further, feel free to reopen. That said, #12702 would still be a better place to continue the discussion about "sticky" feature support for custom post types.

Note: See TracTickets for help on using tickets.