WordPress at a glance
function is not described

WP_Customize_Nav_Menu_Item_Setting::get_type_label() protected WP 4.7.0

Get type label.

{} It's a method of the class: WP_Customize_Nav_Menu_Item_Setting{}

No Hooks.

Return

String. The type label.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_type_label( $item );
$item(object) (required)
Nav menu item.

Changelog

Since 4.7.0 Introduced.

Code of WP_Customize_Nav_Menu_Item_Setting::get_type_label() WP 5.7.2

<?php
protected function get_type_label( $item ) {
	if ( 'post_type' === $item->type ) {
		$object = get_post_type_object( $item->object );
		if ( $object ) {
			$type_label = $object->labels->singular_name;
		} else {
			$type_label = $item->object;
		}
	} elseif ( 'taxonomy' === $item->type ) {
		$object = get_taxonomy( $item->object );
		if ( $object ) {
			$type_label = $object->labels->singular_name;
		} else {
			$type_label = $item->object;
		}
	} elseif ( 'post_type_archive' === $item->type ) {
		$type_label = __( 'Post Type Archive' );
	} else {
		$type_label = __( 'Custom Link' );
	}
	return $type_label;
}