Tribe__Customizer::get_setting_link( string $section, string $setting, string $link_text )

Gets the link to the a specific control/setting in the TEC Customizer.


Parameters

$section

(string) (Required) The section "slug" to link into.

$setting

(string) (Required) The setting "slug" to link to.

$link_text

(string) (Required) The translated text for the link.


Top ↑

Return

(string) The HTML anchor element, linking to the TEC Customizer setting. An empty string is returned if missing a parameter or the setting control cannot be found.


Top ↑

Source

File: src/Tribe/Customizer.php

	public function get_setting_link( $section, $setting, $link_text ) {
		// Bail if something is missing.
		if ( empty( $setting ) || empty( $section ) || empty( $link_text ) ) {
			return '';
		}

		$control_url = $this->get_setting_url( $section, $setting );

		if ( empty( $control_url ) ) {
			return '';
		}

		return sprintf(
			'<a href="%1$s">%2$s</a>',
			esc_url( $control_url ),
			esc_html( $link_text )
		);
	}

Top ↑

Changelog

Changelog
Version Description
4.14.0 Introduced.