WordPress at a glance
function is not described

WP_Customize_Widgets::get_setting_id() public WP 3.9.0

Converts a widget_id into its corresponding Customizer setting ID (option name).

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

No Hooks.

Return

String. Maybe-parsed widget ID.

Usage

$WP_Customize_Widgets = new WP_Customize_Widgets();
$WP_Customize_Widgets->get_setting_id( $widget_id );
$widget_id(string) (required)
Widget ID.

Changelog

Since 3.9.0 Introduced.

Code of WP_Customize_Widgets::get_setting_id() WP 5.5.2

<?php
public function get_setting_id( $widget_id ) {
	$parsed_widget_id = $this->parse_widget_id( $widget_id );
	$setting_id       = sprintf( 'widget_%s', $parsed_widget_id['id_base'] );

	if ( ! is_null( $parsed_widget_id['number'] ) ) {
		$setting_id .= sprintf( '[%d]', $parsed_widget_id['number'] );
	}
	return $setting_id;
}