nav_menu_description

nav_menu_description

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('nav_menu_description') is found 3 times:

  • /wp-includes/customize/class-wp-customize-nav-menu-item-setting.php line 640
    		/** This filter is documented in wp-includes/nav-menu.php */
    		$post->attr_title = apply_filters( 'nav_menu_attr_title', $post->attr_title );
    
    		/** This filter is documented in wp-includes/nav-menu.php */
    		$post->description = apply_filters( 'nav_menu_description', wp_trim_words( $post->description, 200 ) );
    
    		/** This filter is documented in wp-includes/nav-menu.php */
    		$post = apply_filters( 'wp_setup_nav_menu_item', $post );
    
    		return $post;
    	}
    
  • /wp-includes/nav-menu.php line 979
    				 * @since 3.0.0
    				 *
    				 * @param string $description The menu item description.
    				 */
    				$menu_item->description = apply_filters( 'nav_menu_description', wp_trim_words( $menu_item->post_content, 200 ) );
    			}
    
    			$menu_item->classes = ! isset( $menu_item->classes ) ? (array) get_post_meta( $menu_item->ID, '_menu_item_classes', true ) : $menu_item->classes;
    			$menu_item->xfn     = ! isset( $menu_item->xfn ) ? get_post_meta( $menu_item->ID, '_menu_item_xfn', true ) : $menu_item->xfn;
    		} else {
    			$menu_item->db_id            = 0;
    
  • /wp-includes/nav-menu.php line 1007
    			/** This filter is documented in wp-includes/nav-menu.php */
    			$menu_item->attr_title = apply_filters( 'nav_menu_attr_title', '' );
    
    			/** This filter is documented in wp-includes/nav-menu.php */
    			$menu_item->description = apply_filters( 'nav_menu_description', '' );
    			$menu_item->classes     = array();
    			$menu_item->xfn         = '';
    		}
    	} elseif ( isset( $menu_item->taxonomy ) ) {
    		$menu_item->ID               = $menu_item->term_id;
    		$menu_item->db_id            = 0;