public static function getInstance() { if (!self::$_instance) { self::$_instance = new WpBpShop_Settings_API(); } return self::$_instance; }
function __construct() { $this->settings_api = WpBpShop_Settings_API::getInstance(); $this->buatp_basic_setting = get_option('buatp_basic_setting', true); $this->buatp_profile_data_setting = get_option('buatp_profile_data_setting', true); $this->buatp_style_setting = get_option('buatp_style_setting', true); $this->buatp_access_setting = get_option('buatp_access_setting', true); $this->buatp_type_field = isset($this->buatp_basic_setting['buatp_type_field_selection']) ? $this->buatp_basic_setting['buatp_type_field_selection'] : false; if (isset($_POST['buatp_selected_field'])) { $this->buatp_type_field = $_POST['buatp_selected_field']; } add_action('admin_init', array($this, 'admin_init')); if (!is_multisite()) { add_action('admin_menu', array($this, 'admin_menu')); } if (is_multisite()) { add_action('network_admin_menu', array($this, 'admin_menu')); } }