public static function get_settings_pages() { // load the settings pages, if they are not already loaded if (empty(self::$settings)) { // load the admin page assets from our plugin add_action('admin_enqueue_scripts', array(__CLASS__, 'load_admin_page_assets'), 1000); // load the woocommerce wysiwyg field js add_action('woocommerce_admin_field_wysiwyg', array(__CLASS__, 'field_wysiwyg')); $settings = array(); // load the woocoomerce settings api include_once $GLOBALS['woocommerce']->plugin_path() . '/includes/admin/settings/class-wc-settings-page.php'; // load the various settings pages $settings[] = (include 'settings/general.php'); $settings[] = (include 'settings/frontend.php'); // allow adding of other pages if needed self::$settings = apply_filters('qsot_get_settings_pages', array_filter($settings)); } return self::$settings; }
public static function ap_settings_page_head() { global $current_tab, $current_section; require_once 'admin-settings.php'; // Include settings pages qsot_admin_settings::get_settings_pages(); // Get current tab/section $current_tab = empty($_GET['tab']) ? 'general' : sanitize_title($_GET['tab']); $current_section = empty($_REQUEST['section']) ? '' : sanitize_title($_REQUEST['section']); if (empty($_POST)) { return; } qsot_admin_settings::save(); }