apply_filters( ‘page_attributes_dropdown_pages_args’, array $dropdown_args, WP_Post $post )

Filters the arguments used to generate a Pages drop-down element.

Description

See also

Parameters

$dropdown_argsarray
Array of arguments used to generate the pages drop-down.
$postWP_Post
The current post.

Source

$dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post );

Changelog

VersionDescription
3.3.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    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

You must log in before being able to contribute a note or feedback.