WordPress.org

Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#44407 new enhancement

Please add page_attributes_meta_box_parent action to meta-boxes.php

Reported by: garrett-eclipse Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.6
Component: General Keywords:
Focuses: Cc:

Description

Hello,

Can we add a new action after the 'Parent' label to match the one that follows after the 'Template' label.

Placement for new action - https://github.com/WordPress/WordPress/blob/cd4c960a6c17e683bcc76f1efaadcb272955bb83/wp-admin/includes/meta-boxes.php#L924

Existing action for 'Template' - https://github.com/WordPress/WordPress/blob/cd4c960a6c17e683bcc76f1efaadcb272955bb83/wp-admin/includes/meta-boxes.php#L943

Thank you

Change History (2)

#1 @swissspidy
5 weeks ago

What‘s a use case for that?

#2 @garrett-eclipse
5 weeks ago

I wanted to inject a grandparent selector in that position, I relied heavily on ajax for the logic so simply injected it via jQuery instead. With that though there was slim pickings for targetting so ended up having to traverse up from $('label.post-attributes-label[for="parent_id"]) and created #44408 to address that and make it easier to target/manipulate the individual attributes via css/js.
So I'm able to jQuery what I needed for this specific ticket can be minor if anything
Thank you

Last edited 5 weeks ago by garrett-eclipse (previous) (diff)
Note: See TracTickets for help on using tickets.