WordPress.org

Make WordPress Core

Changeset 25935


Ignore:
Timestamp:
10/26/2013 05:47:33 PM (8 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-admin/includes/nav-menu.php.

Props Faison.
Fixes #25474.

File:
1 edited

Legend:

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

    r25868 r25935  
    504504
    505505    foreach ( $post_types as $post_type ) {
     506        /**
     507         * Filter whether a menu items meta box will be added for the current post type.
     508         *
     509         * If a falsey value is returned instead of a post type object,
     510         * the post type menu items meta box will not be added.
     511         *
     512         * @since 3.0.0
     513         *
     514         * @param object $post_type The post type object to be used as a meta box.
     515         */
    506516        $post_type = apply_filters( 'nav_menu_meta_box_object', $post_type );
    507517        if ( $post_type ) {
     
    526536
    527537    foreach ( $taxonomies as $tax ) {
     538        /**
     539         * Filter whether a menu items meta box will be added for the current taxonomy.
     540         *
     541         * If a falsey value is returned instead of a taxonomy object,
     542         * the taxonomy menu items meta box will not be added.
     543         *
     544         * @since 3.0.0
     545         *
     546         * @param object $tax The taxonomy object to be used as a meta box.
     547         */
    528548        $tax = apply_filters( 'nav_menu_meta_box_object', $tax );
    529549        if ( $tax ) {
     
    781801                }
    782802
    783                 $posts = apply_filters( 'nav_menu_items_'.$post_type_name, $posts, $args, $post_type );
     803                /**
     804                 * Filter the posts displayed in the 'View All' tab of the current
     805                 * post type's menu items meta box.
     806                 *
     807                 * The dynamic portion of the hook name, $post_type_name,
     808                 * refers to the slug of the current post type.
     809                 *
     810                 * @since 3.2.0
     811                 *
     812                 * @see WP_Query::query()
     813                 *
     814                 * @param array  $posts     The posts for the current post type.
     815                 * @param array  $args      An array of WP_Query arguments.
     816                 * @param object $post_type The current post type object for this menu item meta box.
     817                 */
     818                $posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type );
    784819                $checkbox_items = walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $posts), 0, (object) $args );
    785820
     
    11381173            return $result . ' <ul class="menu" id="menu-to-edit"> </ul>';
    11391174
     1175        /**
     1176         * Filter the Walker class used to render a menu formatted for editing.
     1177         *
     1178         * @since 3.0.0
     1179         *
     1180         * @param string $walker_class_name The Walker class used to render a menu formatted for editing.
     1181         * @param int    $menu_id           The ID of the menu being rendered.
     1182         */
    11401183        $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $menu_id );
    11411184
     
    12821325    wp_defer_term_counting( false );
    12831326
     1327    /** This action is documented in wp-includes/nav-menu.php */
    12841328    do_action( 'wp_update_nav_menu', $nav_menu_selected_id );
    12851329
Note: See TracChangeset for help on using the changeset viewer.