Ejemplo n.º 1
0
 /**
  */
 public function __construct()
 {
     // call parent constructor
     parent::__construct(BP_LINKS_PLUGIN_DIR . '/bp-links-settings.php', self::OPTION_GROUP);
     // add settings validation filter
     add_filter($this->get_option_group() . '_settings_validate', array($this, 'validate_settings'));
 }
Ejemplo n.º 2
0
 public final function process_settings()
 {
     global $wpsf_settings;
     if (false === empty($this->display_section) && false === empty($wpsf_settings) && true === empty($_POST['option_page'])) {
         foreach ($wpsf_settings as $section_key => $section_config) {
             if (true === isset($section_config['section_id']) && $this->display_section !== $section_config['section_id']) {
                 // don't display it
                 unset($wpsf_settings[$section_key]);
             }
         }
     }
     // as you were
     parent::process_settings();
 }