#55322 closed defect (bug) (invalid)
The Class WP-Post List Table(Method - Column_Default) Contains Irrelevant Keyword 'return'
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | administration | Cc: |
Description
The Class WP-Post-List-Table has a method 'Column_Default' which contains a 'return' statement that prevents hooks from being fired like(hooks:- manage_pages_custom_column, manage_posts_custom_column, manage_{$post->post_type}_posts_custom_column). The return statement is on line number 1302, File-Name:- class-wp-posts-list-table.php.
Change History (5)
#1
@
3 years ago
- Component changed from Administration to Posts, Post Types
- Version changed from 5.9.1 to 3.5
#2
@
3 years ago
The return isn't irrelevant.
That if statement handles only taxonomy columns, and it runs the appropriate filter.
The actions further down are for custom columns, which the taxonomy column is not, so they should not be run in that case.
#3
@
3 years ago
I see I was checking for taxonomy basically. I guess this ticket can be closed.
Thank You For The Explaination
#4
@
3 years ago
- Keywords dev-feedback needs-patch removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Thanks for opening this ticket @cu121!
As @joyously explained:
- When the column is
categories
,tags
, or starts withtaxonomy-
:- Handle the taxonomy and return.
- Otherwise:
- Run an appropriate action hook depending on whether the post type is hierarchical (yes = Pages hook, no = Posts hook).
- Finally, run the action hook for the specific post type.
I'll close this ticket as invalid
, as the method returns at an appropriate time.
Thanks to all for their insight on this.
Hi there, welcome back to WordPress Trac! Thanks for the report.
For reference, the
return
statement was technically added in [32740] / #29881, but it replaced an earlierbreak
statement added in [21788] / #21240, so WordPress 3.5 appears to be the earliest affected version here.