Global_Elements::setup_content_controls()
{@inheritdoc}
Source
File: src/Tribe/Views/V2/Customizer/Section/Global_Elements.php
public function setup_content_controls() {
// Because Customizer doesn't show the default value.
$font_size_base_value = ! empty( $this->get_option( 'font_size_base' ) )
? $this->get_option( 'font_size_base' )
: $this->defaults[ 'font_size_base' ];
return [
'font_family' => [
'priority' => 3,
'type' => 'radio',
'choices' => [
'default' => esc_html_x(
'Default',
'Label for option to use default TEC fonts.',
'the-events-calendar'
),
'theme' => esc_html_x(
"Inherit theme font(s)",
'Label for option to use theme fonts.',
'the-events-calendar'
)
],
],
'font_size_base' => [
'priority' => 6,
'type' => 'number',
'label' => esc_html_x(
'By Pixel',
'The base font size input setting label.',
'the-events-calendar'
),
'input_attrs' => [
'min' => '8',
'max' => '24',
'step' => '1',
'style' => 'width: 4em;',
'value' => (int) $font_size_base_value,
]
],
'font_size' => [
'priority' => 7,
'type' => 'range-slider',
'label' => esc_html_x(
'By Scale',
'The font size selector setting label.',
'the-events-calendar'
),
'input_attrs' => [
'min' => -1,
'max' => 1,
'step' => 1,
],
'choices' => [
'small' => $this->small_font_multiplier,
'medium' => '1',
'large' => $this->large_font_multiplier,
],
],
'event_title_color' => [
'priority' => 15,
'type' => 'color',
'label' => esc_html_x(
'Event Title',
'The event title color setting label.',
'the-events-calendar'
),
],
'event_date_time_color' => [
'priority' => 17,
'type' => 'color',
'label' => esc_html_x(
'Event Date and Time',
'The event title color setting label.',
'the-events-calendar'
),
'description' => esc_html_x(
'Main date and time display on views and single event pages',
'The description for the event date and time color setting.',
'the-events-calendar'
),
],
'link_color' => [
'priority' => 18,
'type' => 'color',
'label' => esc_html_x(
'Link Color',
'The link color setting label.',
'the-events-calendar'
),
'description' => esc_html__(
'For displayed URLs',
'the-events-calendar'
),
],
'background_color_choice' => [
'priority' => 25,
'type' => 'radio',
'label' => esc_html__( 'Background Color', 'the-events-calendar' ),
'description' => esc_html__( 'All calendar and event pages', 'the-events-calendar' ),
'choices' => [
'transparent' => esc_html_x(
'Transparent.',
'Label for option to leave transparent (default).',
'the-events-calendar'
),
'custom' => esc_html_x(
'Select Custom Color',
'Label for option to set a custom color.',
'the-events-calendar'
),
],
],
'background_color' => [
'priority' => 26, // Should come right after background_color_choice
'type' => 'color',
],
'accent_color' => [
'priority' => 30,
'type' => 'color',
'label' => esc_html_x(
'Accent Color',
'The event accent color setting label.',
'the-events-calendar'
),
],
];
}