Tribe__Customizer::add_fse_customizer_link_to_display_tab( array $settings )

Inserts link to TEC Customizer section for FSE themes in Events > Settings > Display.


Parameters

$settings

(<span class="arrayarray<string|">mixed>) (Required) The existing settings array.


Top ↑

Return

(array<string|mixed>) $settings The modified settings array.


Top ↑

Source

File: src/Tribe/Customizer.php

	public function add_fse_customizer_link_to_display_tab( $settings ) {
		// Exit early if the FSE theme feature isn't present.
		if ( ! function_exists( 'gutenberg_is_fse_theme' ) ) {
			return $settings;
		}

		// Exit early if the current theme is not a FSE theme.
		if (  ! gutenberg_is_fse_theme() ) {
			return $settings;
		}

		$new_settings = [
			'tribe-customizer-section-title' => [
				'type' => 'html',
				'html' => '<h3>' . __( 'Customizer', 'the-events-calendar' ) . '</h3>',
			],
			'tribe-customizer-link-description' => [
				'type' => 'html',
				'html' => '<p class="contained">' . __( 'Adjust colors, fonts, and more with the WordPress Customizer.', 'the-events-calendar' ) . '</p>',
			],
			'tribe-customizer-link' => [
				'type' => 'html',
				'html' => sprintf(
					/* translators: %1$s: opening anchor tag; %2$s: closing anchor tag */
					esc_html_x( '%1$sCustomize The Events Calendar%2$s', 'Link text added to the TEC->Settings->Display tab.', 'tribe-common' ),
					'<p class="contained"><a href="' . esc_url( admin_url( 'customize.php?autofocus[panel]=tribe_customizer' ) ) . '">',
					'</a></p>'
				),
			],
		];

		$settings = Tribe__Main::array_insert_after_key( 'tribe-form-content-start', $settings, $new_settings );

		return $settings;
	}

Top ↑

Changelog

Changelog
Version Description
4.14.8 Introduced.