Filters the arguments used to generate a Pages drop-down element.
Description
See also
Parameters
$dropdown_args
array- Array of arguments used to generate the pages drop-down.
$post
WP_Post- The current post.
Source
$dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post );
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |
This hook is not working with Gutenberg / Block Editor
“The following conditions is assumed to make it working:
Classic Editor is in use, since Gutenberg/Block Editor is rendered by Javascript, it requires another solutions and so far I am not sure if there is override option yet.”
Override method for Gutenberg/Block Editor
Please use the filter rest_{$this->post_type}_query to override the query
Open Issue: https://github.com/WordPress/gutenberg/issues/9089
Source:
https://wordpress.stackexchange.com/a/365451