コード例 #1
0
ファイル: FeedBurnerAdmin.php プロジェクト: easinewe/Avec2016
 /**
  * Setups sections
  */
 function admin_init()
 {
     w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/extensions.php');
     // Register our settings field group
     w3tc_add_settings_section('ping', 'Ping FeedBurner', '__return_false', 'feedburner');
     $settings = $this->settings();
     foreach ($settings as $setting => $meta) {
         /**
          * @var $label
          * @var $description
          * @var $section
          * @var $type
          */
         extract($meta);
         w3tc_add_settings_field($setting, $label, array($this, 'print_setting'), 'feedburner', $section, array('label_for' => $setting, 'type' => $type, 'description' => $description));
     }
 }
コード例 #2
0
ファイル: GenesisAdmin.php プロジェクト: easinewe/Avec2016
 /**
  * Setups sections
  */
 function admin_init()
 {
     w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/extensions.php');
     // Register our settings field group
     w3tc_add_settings_section('header', 'Header', '__return_false', 'genesis.theme');
     w3tc_add_settings_section('content', 'Content', '__return_false', 'genesis.theme');
     w3tc_add_settings_section('sidebar', 'Sidebar', '__return_false', 'genesis.theme');
     w3tc_add_settings_section('footer', 'Footer', '__return_false', 'genesis.theme');
     w3tc_add_settings_section('exclusions', 'Disable fragment cache', '__return_false', 'genesis.theme');
     $settings = $this->settings();
     foreach ($settings as $setting => $meta) {
         /**
          * @var $label
          * @var $description
          * @var $section
          * @var $type
          */
         extract($meta);
         w3tc_add_settings_field($setting, $label, array($this, 'print_setting'), 'genesis.theme', $section, array('label_for' => $setting, 'type' => $type, 'description' => $description));
     }
 }