Tribe__Customizer::get_setting_name( string $slug, string|WP_Customize_Section $section = null )

Build the Setting name using the HTML format for Arrays


Parameters

$slug

(string) (Required) The actual Setting name

$section

(string|WP_Customize_Section) (Optional) The section the setting lives in.

Default value: null


Top ↑

Return

(string) HTML name Attribute name of the setting.


Top ↑

Source

File: src/Tribe/Customizer.php

	public function get_setting_name( $slug, $section = null ) {
		$name = $this->panel->id;

		// If there is a section set append it
		if ( $section instanceof WP_Customize_Section ) {
			$name .= '[' . $section->id . ']';
		} elseif ( is_string( $section ) ) {
			$name .= '[' . $section . ']';
		}

		// Set the actual setting slug
		$name .= '[' . esc_attr( $slug ) . ']';

		return $name;
	}

Top ↑

Changelog

Changelog
Version Description
4.0 Introduced.