/**
  * Method to return the Private instance of the Class
  *
  * @since 4.0
  *
  * @access public
  * @return Tribe__Events__Pro__Customizer__Main
  */
 public static function instance()
 {
     // This also prevents double instancing the class
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
 /**
  * Create the Fields/Settings for this sections
  *
  * @param  WP_Customize_Section $section The WordPress section instance
  * @param  WP_Customize_Manager $manager [description]
  *
  * @return void
  */
 public function register_settings(WP_Customize_Section $section, WP_Customize_Manager $manager)
 {
     $customizer = Tribe__Events__Pro__Customizer__Main::instance();
     $manager->add_setting($customizer->get_setting_name('bg_color', $section), array('default' => $this->get_default('bg_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('bg_color', $section), array('label' => __('Photo Background Color', 'tribe-events-calendar-pro'), 'section' => $section->id)));
     // Introduced to make Selective Refresh have less code duplication
     $customizer->add_setting_name($customizer->get_setting_name('bg_color', $section));
 }
 /**
  * Create the Fields/Settings for this sections
  *
  * @param  WP_Customize_Section $section The WordPress section instance
  * @param  WP_Customize_Manager $manager [description]
  *
  * @return void
  */
 public function settings(WP_Customize_Section $section, WP_Customize_Manager $manager)
 {
     $customizer = Tribe__Events__Pro__Customizer__Main::instance();
     $manager->add_setting($customizer->get_setting_name('calendar_header_color', $section), array('default' => $this->get_default('calendar_header_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('calendar_header_color', $section), array('label' => __('Calendar Header Color'), 'section' => $section->id)));
     $manager->add_setting($customizer->get_setting_name('calendar_datebar_color', $section), array('default' => $this->get_default('calendar_datebar_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('calendar_datebar_color', $section), array('label' => __('Calendar Date Bar Color'), 'section' => $section->id)));
 }
 /**
  * Create the Fields/Settings for this sections
  *
  * @param  WP_Customize_Section $section The WordPress section instance
  * @param  WP_Customize_Manager $manager [description]
  *
  * @return void
  */
 public function register_settings(WP_Customize_Section $section, WP_Customize_Manager $manager)
 {
     $customizer = Tribe__Events__Pro__Customizer__Main::instance();
     $manager->add_setting($customizer->get_setting_name('post_title_color', $section), array('default' => $this->get_default('post_title_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('post_title_color', $section), array('label' => esc_html__('Post Title Color', 'tribe-events-calendar-pro'), 'section' => $section->id)));
     $manager->add_setting($customizer->get_setting_name('details_bg_color', $section), array('default' => $this->get_default('details_bg_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('details_bg_color', $section), array('label' => esc_html__('Details Background Color', 'tribe-events-calendar-pro'), 'section' => $section->id)));
 }
 /**
  * Create the Fields/Settings for this sections
  *
  * @param  WP_Customize_Section $section The WordPress section instance
  * @param  WP_Customize_Manager $manager [description]
  *
  * @return void
  */
 public function register_settings(WP_Customize_Section $section, WP_Customize_Manager $manager)
 {
     $customizer = Tribe__Events__Pro__Customizer__Main::instance();
     $manager->add_setting($customizer->get_setting_name('link_color', $section), array('default' => $this->get_default('link_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('link_color', $section), array('label' => esc_html__('Link Color', 'tribe-events-calendar-pro'), 'section' => $section->id)));
     $manager->add_setting($customizer->get_setting_name('filterbar_color', $section), array('default' => $this->get_default('filterbar_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('filterbar_color', $section), array('label' => esc_html__('Filter Bar Color', 'tribe-events-calendar-pro'), 'section' => $section->id)));
     $manager->add_setting($customizer->get_setting_name('button_color', $section), array('default' => $this->get_default('button_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('button_color', $section), array('label' => esc_html__('Button Color', 'tribe-events-calendar-pro'), 'section' => $section->id)));
 }
 /**
  * Overwrite this method to be able to implement the CSS template related to this section
  *
  * @return string
  */
 public function get_css_template($template)
 {
     $customizer = Tribe__Events__Pro__Customizer__Main::instance();
     return $template;
 }
 /**
  * Create the Fields/Settings for this sections
  *
  * @param  WP_Customize_Section $section The WordPress section instance
  * @param  WP_Customize_Manager $manager [description]
  *
  * @return void
  */
 public function register_settings(WP_Customize_Section $section, WP_Customize_Manager $manager)
 {
     $customizer = Tribe__Events__Pro__Customizer__Main::instance();
     $manager->add_setting($customizer->get_setting_name('table_bg_color', $section), array('default' => $this->get_default('table_bg_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('table_bg_color', $section), array('label' => __('Calendar Table Color'), 'section' => $section->id)));
     $manager->add_setting($customizer->get_setting_name('highlight_color', $section), array('default' => $this->get_default('highlight_color'), 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
     $manager->add_control(new WP_Customize_Color_Control($manager, $customizer->get_setting_name('highlight_color', $section), array('label' => __('Calendar Hightlight Color'), 'section' => $section->id)));
 }