Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#27345 closed enhancement (wontfix)

Add class to posts list table row if page has children

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

Description

If we take a look at current class-wp-posts-list-table.php, classes like level-0 or level-* are added to the table row which indicates the depth of page it is in.It does not give any information about whether the page has children as level-0 gets added to every page that is not a sub-page that includes pages which doesn't have children.

What i'm suggesting is we have an extra-class 'page-has-children' that gets added to row when the page(only page not any custom type post which supports hierarchy) has children.

It will be very helpful to distinctly style page rows , also helpful for plugins(not much)which depends on JavaScript to manipulate the list management.

Attachments (2)

27345.patch (730 bytes) - added by bravokeyl 11 years ago.
Initial attempt to add class
27345-2.diff (724 bytes) - added by bravokeyl 11 years ago.
change of ' page_has_children ' to ' page-has-children '

Download all attachments as: .zip

Change History (6)

@bravokeyl
11 years ago

Initial attempt to add class

@bravokeyl
11 years ago

change of ' page_has_children ' to ' page-has-children '

#1 @bravokeyl
11 years ago

  • Version 3.8.1 deleted

#2 @DrewAPicture
10 years ago

  • Component changed from General to Posts, Post Types

#3 @SergeyBiryukov
10 years ago

  • Focuses administration added

#4 @DrewAPicture
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Hi @bravokeyl, welcome to Trac!

Sorry it took so long for somebody to respond in a meaningful way.

There doesn't seem to be a great deal of interest in pursuing this change, so I'm close it out as wontfix. Thank you for the suggestion.

Note: See TracTickets for help on using tickets.