Make WordPress Core


Ignore:
Timestamp:
10/26/2019 09:07:10 PM (6 years ago)
Author:
johnbillion
Message:

Docs: Switch more docs over to typed array notation, plus some fixes.

See #48303, #41756

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r46553 r46596  
    633633 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
    634634 *                       a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
    635  * @return array Array of children, where the type of each element is determined by $output parameter.
    636  *               Empty array on failure.
     635 * @return WP_Post[]|int[] Array of post objects or post IDs.
    637636 */
    638637function get_children( $args = '', $output = OBJECT ) {
     
    16001599 * @global array $post_type_meta_caps Used to store meta capabilities.
    16011600 *
    1602  * @param array $capabilities Post type meta capabilities.
     1601 * @param string[] $capabilities Post type meta capabilities.
    16031602 */
    16041603function _post_type_meta_capabilities( $capabilities = null ) {
     
    47324731     * @since 2.0.0
    47334732     *
    4734      * @param array $pung    Array of enclosures for the given post.
    4735      * @param int   $post_id Post ID.
     4733     * @param string[] $pung    Array of enclosures for the given post.
     4734     * @param int      $post_id Post ID.
    47364735     */
    47374736    return apply_filters( 'get_enclosed', $pung, $post_id );
     
    47744773 *
    47754774 * @param int|WP_Post $post_id Post Object or ID
    4776  * @return array
     4775 * @param string[] List of URLs yet to ping.
    47774776 */
    47784777function get_to_ping( $post_id ) {
     
    47914790     * @since 2.0.0
    47924791     *
    4793      * @param array $to_ping List of URLs yet to ping.
     4792     * @param string[] $to_ping List of URLs yet to ping.
    47944793     */
    47954794    return apply_filters( 'get_to_ping', $to_ping );
     
    50665065 * @since 2.0.0
    50675066 *
    5068  * @param array $pages   Posts array (passed by reference).
    5069  * @param int   $page_id Optional. Parent page ID. Default 0.
    5070  * @return array A list arranged by hierarchy. Children immediately follow their parents.
     5067 * @param WP_Post[] $pages   Posts array (passed by reference).
     5068 * @param int       $page_id Optional. Parent page ID. Default 0.
     5069 * @return string[] Array of post names keyed by ID and arranged by hierarchy. Children immediately follow their parents.
    50715070 */
    50725071function get_page_hierarchy( &$pages, $page_id = 0 ) {
     
    50975096 * @see _page_traverse_name()
    50985097 *
    5099  * @param int   $page_id   Page ID.
    5100  * @param array $children Parent-children relations (passed by reference).
    5101  * @param array $result    Result (passed by reference).
     5098 * @param int      $page_id  Page ID.
     5099 * @param array    $children Parent-children relations (passed by reference).
     5100 * @param string[] $result   Array of page names keyed by ID (passed by reference).
    51025101 */
    51035102function _page_traverse_name( $page_id, &$children, &$result ) {
     
    54625461     * @since 2.1.0
    54635462     *
    5464      * @param array $pages List of pages to retrieve.
    5465      * @param array $parsed_args    Array of get_pages() arguments.
     5463     * @param WP_Post[] $pages       Array of page objects.
     5464     * @param array     $parsed_args Array of get_pages() arguments.
    54665465     */
    54675466    return apply_filters( 'get_pages', $pages, $parsed_args );
     
    61086107
    61096108            /**
    6110              * Filters the list of icon directory URIs.
     6109             * Filters the array of icon directory URIs.
    61116110             *
    61126111             * @since 2.5.0
    61136112             *
    6114              * @param array $uris List of icon directory URIs.
     6113             * @param string[] $uris Array of icon directory URIs keyed by directory absolute path.
    61156114             */
    61166115            $dirs       = apply_filters( 'icon_dirs', array( $icon_dir => $icon_dir_uri ) );
     
    70967095 * @global wpdb $wpdb WordPress database abstraction object.
    70977096 *
    7098  * @param array $clauses An array including WHERE, GROUP BY, JOIN, ORDER BY,
    7099  *                       DISTINCT, fields (SELECT), and LIMITS clauses.
    7100  * @return array The modified clauses.
     7097 * @param string[] $clauses An array including WHERE, GROUP BY, JOIN, ORDER BY,
     7098 *                          DISTINCT, fields (SELECT), and LIMITS clauses.
     7099 * @return string[] The modified array of clauses.
    71017100 */
    71027101function _filter_query_attachment_filenames( $clauses ) {
Note: See TracChangeset for help on using the changeset viewer.