Advertisements

wp_nav_menu_post_type_meta_boxes

Definition:
function wp_nav_menu_post_type_meta_boxes() {}

Creates metaboxes for any post type menu item.

Defined filters

  • nav_menu_meta_box_object
    apply_filters( 'nav_menu_meta_box_object', $post_type )

Source code

function wp_nav_menu_post_type_meta_boxes() {

	$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );



	if ( ! $post_types )

		return;



	foreach ( $post_types as $post_type ) {

		$post_type = apply_filters( 'nav_menu_meta_box_object', $post_type );

		if ( $post_type ) {

			$id = $post_type->name;

			add_meta_box( "add-{$id}", $post_type->labels->name, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', 'default', $post_type );

		}

	}

3933

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: