[wp-trac] [WordPress Trac] #54795: Bootstrap: Move navigation post type hooks to `admin-filters.php`

WordPress Trac noreply at wordpress.org
Mon Apr 11 13:57:44 UTC 2022


#54795: Bootstrap: Move navigation post type hooks to `admin-filters.php`
----------------------------+---------------------
 Reporter:  dlh             |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  6.0
Component:  Bootstrap/Load  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+---------------------

Comment (by antonvlasenko):

 I've investigated hooks present in the `default-filters.php` file.
 Out of more than 400 hooks listed in that file, only 9 hooks don't have
 available callbacks. So it means that these 9 callback functions should be
 called from the admin context. I've checked the source code, and I confirm
 that.
 I've moved 6 hooks to the `admin-filters.php` file.
 According to the [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-includes/default-filters.php#L644 this comment]
 in the `default-filters.php` file, the remaining 3 hooks could be used on
 the front-end as well so I didn't move them.
 I'd appreciate a quick review and merge of my PR as WP 6.0 Beta 1 should
 be released tomorrow.

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


More information about the wp-trac mailing list