{u{u 0?(Z&et tX,?/= .{u{u(&.!X\X, u;{u{u00?(; ;KA #0X,KA&X,x:KA@&X,JA#0X,KA&X,`JA,X,Z8ZpZZZZPZZZZ0ZhZZZZHZZZZ(Z`ZZZZZ Z,,,8,p,,,,P,D-8?KA@9t @z=Vt 9c-J-`#{=V( 0(`PKA&D-8PKA"0D-HPKA(D-XQKA'D-hXQKA?D-xQKA1D-QKA7D-8RKA7D-pRKA9D-RKA@9D-RKA9D-0SKA'D-pSKA 'D-SKA&D-SKA9D-TKA7D-(PTKA@9D-8TKA7D-"&D- t'0{u{u(357(0!eD-8/07{u{u@0?(wL? `7!X'D-7/@t{u{u(%@t (D-t :;{u 3(nt: gD-[ҵ)L8 Ԕ{uP0?(/ Q8 ƵD-@m 3{u`0?nt() { if ( ! empty( $this->steps[ $this->step ]['view'] ) ) { call_user_func( $this->steps[ $this->step ]['view'], $this ); } } /** * Setup Wizard Footer. */ public function setup_wizard_footer() { require_once dirname( __FILE__ ) . '/partials/setup-wizard-footer.php'; } public function setup_wizard_basic() { $opts = geot_settings(); $defaults = [ 'license' => '', 'api_secret' => '', 'fallback_country' => '', 'bots_country' => '', 'var_ip' => 'REMOTE_ADDR', ]; $opts = wp_parse_args( $opts, apply_filters( 'geot/default_settings', $defaults ) ); $countries = geot_countries(); $ips = \GeotCore\geot_ips_available(); require_once dirname( __FILE__ ) . '/partials/setup-wizard-basic.php'; } public function setup_wizard_basic_save() { check_admin_referer( 'geot-setup' ); $settings = array_map( 'esc_html', $_POST['geot_settings'] ); $settings = array_map( 'trim', $settings ); // update license field if ( ! empty( $settings['license'] ) ) { $license = esc_attr( $settings['license'] ); GeotSettings::is_valid_license( $license ); } // old settings $old_settings = geot_settings(); // checkboxes dirty hack $inputs = [ 'license', 'api_secret', 'fallback_country', 'bots_country', ]; foreach ( $inputs as $input ) { if ( ! isset( $settings[ $input ] ) || empty( $settings[ $input ] ) ) { $settings[ $input ] = ''; } } if ( is_array( $old_settings ) ) { $settings = array_merge( $old_settings, $settings ); } update_option( 'geot_settings', $settings ); } /** * Register/enqueue scripts and styles for the Setup Wizard. * Hooked onto 'admin_enqueue_scripts'. */ public function enqueue_scripts() { $version = \GeotCore\get_version(); wp_enqueue_style( 'buttons' ); wp_enqueue_style( 'geot-setup', $this->plugin_url . 'css/wizard.css', [ 'buttons' ], $version, 'all' ); wp_enqueue_script( 'geot-selectize', $this->plugin_url . 'js/selectize.min.js', [ 'jquery' ], $version, false ); wp_enqueue_script( 'geot-chosen', $this->plugin_url . 'js/chosen.jquery.min.js', [ 'jquery' ], $version, false ); } }