wphooks.info - wp_setup_nav_menu_item

wp_setup_nav_menu_item

(trunk - 5.1-alpha-44286)

The hook occurs in the following 2 files

wp-includes/customize/class-wp-customize-nav-menu-item-setting.php:
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
			$post->url = '';
		}

		/** 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;
	}

	/**
	 * Sanitize an input.
	 *
	 * Note that parent::sanitize() erroneously does wp_unslash() on $value, but
	 * we remove that in this override.
wp-includes/nav-menu.php:
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
	}

	/**
	 * Filters a navigation menu item object.
	 *
	 * @since 3.0.0
	 *
	 * @param object $menu_item The menu item object.
	 */
	return apply_filters( 'wp_setup_nav_menu_item', $menu_item );
}

/**
 * Get the menu items associated with a particular object.
 *
 * @since 3.0.0
 *
 * @param int    $object_id   The ID of the original object.
 * @param string $object_type The type of object, such as "taxonomy" or "post_type."