page_attributes_dropdown_pages_args filter does not work

Question

Tried to add filter hook page_attributes_dropdown_pages_args to my website together with quick_edit_dropdown_pages_args like below to my functions.php theme file.

function admin_page_attributes_meta_filter($dropdown_args, $post=NULL) {
    $dropdown_args['depth'] = 1;
    return $dropdown_args;

}
add_filter( 'page_attributes_dropdown_pages_args', 'admin_page_attributes_meta_filter', 10, 2 );
add_filter( 'quick_edit_dropdown_pages_args', 'admin_page_attributes_meta_filter');

quick_edit_dropdown_pages_args is working, page_attributes_dropdown_pages_args – not. Tried to use different dropdown arguments, described in get_pages documentation and wp_dropdown_pages documentation. Tried different options, like changing function arguments: ($dropdown_args, $post). I have no idea why there is no way to apply the filter to page_attributes_dropdown_pages_args hook.

quick_edit_dropdown_pages_args

page_attributes_dropdown_pages_args

0
alicjap 2 months 0 Answers 12 views 0

Leave an answer