Tribe__Customizer::get_setting_url( string $section, string $setting )
Gets the URL to a specific control/setting in the TEC Customizer.
Contents
Parameters
- $section
-
(string) (Required) The section "slug" to link into.
- $setting
-
(string) (Required) The setting "slug" to link to.
Return
(string) The URL to the setting. An empty string is returned if a parameter is missing or the setting control cannot be found.
Source
File: src/Tribe/Customizer.php
public function get_setting_url( $section, $setting ) {
// Bail if something is missing.
if ( empty( $setting ) || empty( $section ) ) {
return '';
}
$control = $this->get_setting_name( $setting, $section );
if ( empty( $control ) ) {
return '';
}
$query['autofocus[control]'] = $control;
return add_query_arg( $query, admin_url( 'customize.php' ) );
}
Changelog
| Version | Description |
|---|---|
| 4.14.0 | Introduced. |