Beispiel #1
0
 /**
  *  Init behaves like, and replaces, construct
  */
 public function init()
 {
     // Register the customizer object
     global $wp_customize;
     $this->customizer = $wp_customize;
     // Set Prefix
     $this->prefix = LAYERS_THEME_SLUG . '-';
     // Grab the customizer config
     $this->config = Layers_Customizer_Config::get_instance();
     //Register the panels and sections based on this instance's config
     // Start registration with the panels & sections
     $this->register_panels($this->config->panels);
     $this->register_sections($this->config->sections);
     // Move default sections into Layers Panels
     $this->move_default_sections($this->config->default_sections);
     // Change 'Widgets' panel title to 'Edit Layout'
     $wp_customize->add_panel('widgets', array('priority' => 0, 'title' => __('Edit Layout', 'layerswp'), 'description' => Layers_Customizer::get_instance()->render_builder_page_dropdown() . __('Use this area to add widgets to your page, use the (Layers) widgets for the Body section.', 'layerswp')));
 }
Beispiel #2
0
/**
*  Kicking this off with the 'widgets_init' hook
*/
function layers_customizer_init()
{
    $layers_widget = Layers_Customizer::get_instance();
}