/**
  * Set up our control.
  *
  * @since  0.9.0
  * @access public
  * @param  object  $manager
  * @return void
  */
 public function __construct($manager)
 {
     /* Let WP handle this. */
     parent::__construct($manager);
     /* Allow themes to register custom backgrounds. */
     $this->default_backgrounds = apply_filters('omega_default_backgrounds', $this->default_backgrounds);
     /* WordPress will only output the 'default' tab if there's a default image. Make sure it gets added. */
     if (!$this->setting->default && !empty($this->default_backgrounds)) {
         $this->add_tab('default', _x('Default', 'theme customizer tab', 'omega'), array($this, 'tab_default_background'));
     }
 }
예제 #2
0
 /**
  * Constructor
  *
  * @since 0.9
  */
 public function __construct($manager, $id = false, $args = array())
 {
     parent::__construct($manager);
     // Presets array
     $this->presets = isset($args['presets']) ? $args['presets'] : array();
     // Add presets tab (multiple)
     if ($this->presets) {
         $this->add_tab('ctc_presets', _x('Presets', 'customizer', 'church-theme-framework'), array($this, 'tab_preset_backgrounds'));
     }
     // Remove "Default" tab - user can select first in presets
     $this->remove_tab('default');
 }