Make WordPress Core


Ignore:
Timestamp:
02/09/2018 05:25:22 PM (7 years ago)
Author:
johnbillion
Message:

Docs: First pass at switching some array parameter documentation to typed notation.

Props janak007

See #41756

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/nav-menu.php

    r42343 r42679  
    462462                 * @since 4.9.0 Added the `$recent_args` parameter.
    463463                 *
    464                  * @param array $most_recent An array of post objects being listed.
    465                  * @param array $args        An array of WP_Query arguments for the meta box.
    466                  * @param array $box         Arguments passed to wp_nav_menu_item_post_type_meta_box().
    467                  * @param array $recent_args An array of WP_Query arguments for 'Most Recent' tab.
     464                 * @param WP_Post[] $most_recent An array of post objects being listed.
     465                 * @param array     $args        An array of `WP_Query` arguments for the meta box.
     466                 * @param array     $box         Arguments passed to `wp_nav_menu_item_post_type_meta_box()`.
     467                 * @param array     $recent_args An array of `WP_Query` arguments for 'Most Recent' tab.
    468468                 */
    469469                $most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box, $recent_args );
     
    590590                 * @see WP_Query::query()
    591591                 *
    592                  * @param array        $posts     The posts for the current post type.
    593                  * @param array        $args      An array of WP_Query arguments.
     592                 * @param object[]     $posts     The posts for the current post type. Mostly `WP_Post` objects, but
     593                 *                                can also contain "fake" post objects to represent other menu items.
     594                 * @param array        $args      An array of `WP_Query` arguments.
    594595                 * @param WP_Post_Type $post_type The current post type object for this menu item meta box.
    595596                 */
     
    890891 * @since 3.0.0
    891892 *
    892  * @param int $menu_id The menu ID for which to save this item. $menu_id of 0 makes a draft, orphaned menu item.
    893  * @param array $menu_data The unsanitized posted menu item data.
    894  * @return array The database IDs of the items saved
     893 * @param int     $menu_id   The menu ID for which to save this item. Value of 0 makes a draft, orphaned menu item. Default 0.
     894 * @param array[] $menu_data The unsanitized POSTed menu item data.
     895 * @return int[] The database IDs of the items saved
    895896 */
    896897function wp_save_nav_menu_items( $menu_id = 0, $menu_data = array() ) {
Note: See TracChangeset for help on using the changeset viewer.