Make WordPress Core

Ticket #38166: 38166.1.diff

File 38166.1.diff, 3.5 KB (added by dimadin, 9 years ago)
  • wp-includes/nav-menu-template.php

     
    2121 * @param array $args {
    2222 *     Optional. Array of nav menu arguments.
    2323 *
    24  *     @type int|string|WP_Term $menu            Desired menu. Accepts (matching in order) id, slug, name, menu object. Default empty.
     24 *     @type int|string|WP_Term $menu            Desired menu. Accepts menu ID, slug, name, or object. Default empty.
    2525 *     @type string             $menu_class      CSS class to use for the ul element which forms the menu. Default 'menu'.
    2626 *     @type string             $menu_id         The ID that is applied to the ul element which forms the menu.
    2727 *                                               Default is the menu slug, incremented.
  • wp-includes/nav-menu.php

     
    1212 *
    1313 * @since 3.0.0
    1414 *
    15  * @param int|string|WP_Term $menu Menu ID, slug, or name - or the menu object.
     15 * @param int|string|WP_Term $menu Menu ID, slug, name, or object.
    1616 * @return WP_Term|false False if $menu param isn't supplied or term does not exist, menu object if successful.
    1717 */
    1818function wp_get_nav_menu_object( $menu ) {
     
    4343         *
    4444         * @since 4.3.0
    4545         *
    46          * @param object|false $menu_obj Term from nav_menu taxonomy, or false if nothing had been found.
    47          * @param string       $menu     The menu ID, slug, or name passed to wp_get_nav_menu_object().
     46         * @param WP_Term|false      $menu_obj Term from nav_menu taxonomy, or false if nothing had been found.
     47         * @param int|string|WP_Term $menu     The menu ID, slug, name, or object passed to wp_get_nav_menu_object().
    4848         */
    4949        return apply_filters( 'wp_get_nav_menu_object', $menu_obj, $menu );
    5050}
     
    5656 *
    5757 * @since 3.0.0
    5858 *
    59  * @param int|string $menu The menu to check (ID, slug, or name).
     59 * @param int|string|WP_Term $menu ID, slug, name, or object of menu to check.
    6060 * @return bool Whether the menu exists.
    6161 */
    6262function is_nav_menu( $menu ) {
     
    215215 *
    216216 * @since 3.0.0
    217217 *
    218  * @param string $menu Menu ID, slug, or name.
     218 * @param int|string|WP_Term $menu Menu ID, slug, name, or object.
    219219 * @return bool|WP_Error True on success, false or WP_Error object on failure.
    220220 */
    221221function wp_delete_nav_menu( $menu ) {
     
    612612 * @global string $_menu_item_sort_prop
    613613 * @staticvar array $fetched
    614614 *
    615  * @param string $menu Menu name, ID, or slug.
    616  * @param array  $args Optional. Arguments to pass to get_posts().
     615 * @param int|string|WP_Term $menu Menu ID, slug, name, or object.
     616 * @param array              $args Optional. Arguments to pass to get_posts().
    617617 * @return false|array $items Array of menu items, otherwise false.
    618618 */
    619619function wp_get_nav_menu_items( $menu, $args = array() ) {
     
    772772
    773773                                $menu_item->type_label = __( 'Post Type Archive' );
    774774                                $post_content = wp_trim_words( $menu_item->post_content, 200 );
    775                                 $post_type_description = '' == $post_content ? $post_type_description : $post_content; 
     775                                $post_type_description = '' == $post_content ? $post_type_description : $post_content;
    776776                                $menu_item->url = get_post_type_archive_link( $menu_item->object );
    777777                        } elseif ( 'taxonomy' == $menu_item->type ) {
    778778                                $object = get_taxonomy( $menu_item->object );