ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

BaseSection.php (661B)


      1 <?php
      2 
      3 namespace Materialis\Customizer;
      4 
      5 class BaseSection extends \WP_Customize_Section
      6 {
      7     protected $cpData = null;
      8 
      9     public function __construct($manager, $id, $cpData = array())
     10     {
     11         $this->cpData = $cpData;
     12 
     13         $args = (isset($this->cpData['wp_data'])) ? $this->cpData['wp_data'] : array();
     14         $args = \Materialis\Companion::translateArgs($args);
     15 
     16         parent::__construct($manager, $id, $args);
     17         $this->init();
     18     }
     19 
     20 
     21 
     22     final protected function companion()
     23     {
     24         return \Materialis\Companion::instance();
     25     }
     26 
     27     protected function init()
     28     {
     29         return true;
     30     }
     31 }