WordPress at a glance
function is not described

WP_Customize_Widgets::get_setting_type() protected WP 4.2.0

Retrieves the widget setting type given a setting ID.

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

No Hooks.

Return

String/null. Setting type.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_setting_type( $setting_id );
$setting_id(string) (required)
Setting ID.

Changelog

Since 4.2.0 Introduced.

Code of WP_Customize_Widgets::get_setting_type() WP 5.5.2

<?php
protected function get_setting_type( $setting_id ) {
	static $cache = array();
	if ( isset( $cache[ $setting_id ] ) ) {
		return $cache[ $setting_id ];
	}
	foreach ( $this->setting_id_patterns as $type => $pattern ) {
		if ( preg_match( $pattern, $setting_id ) ) {
			$cache[ $setting_id ] = $type;
			return $type;
		}
	}
}