Docs: Correct and improve the documented types for various functions and hooks.

See #55646


git-svn-id: https://develop.svn.wordpress.org/trunk@53877 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2022-08-11 14:01:35 +00:00
parent 2b6107d05f
commit 0f1f17ebe2
14 changed files with 58 additions and 47 deletions

View File

@@ -861,7 +861,7 @@ function _wp_relative_upload_path( $path ) {
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
* correspond to a WP_Post object, an associative array, or a numeric array,
* respectively. Default OBJECT.
* @return WP_Post[]|int[] Array of post objects or post IDs.
* @return WP_Post[]|array[]|int[] Array of post objects, arrays, or IDs, depending on `$output`.
*/
function get_children( $args = '', $output = OBJECT ) {
$kids = array();
@@ -5806,9 +5806,9 @@ function get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' )
*
* @since 1.5.1
*
* @param int $page_id Page ID.
* @param array $pages List of page objects from which descendants should be identified.
* @return array List of page children.
* @param int $page_id Page ID.
* @param WP_Post[] $pages List of page objects from which descendants should be identified.
* @return WP_Post[] List of page children.
*/
function get_page_children( $page_id, $pages ) {
// Build a hash of ID -> children.