__('Clear'), 'defaultString' => __('Default'), 'pick' => __('Select Color')); wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', $colorpicker_l10n ); wp_enqueue_media(); wp_enqueue_script( 'ae-admin-customizer-js', plugins_url('/assets/js/ae-admin-customizer.js', AE_ADMIN_CUSTOMIZER_PLUGIN__FILE__ ), array('jquery'), '1.0', true); } /** * Enqueue AE Admin Customizer Required FrontEnd Scripts * @author Allan Empalmado (AppDevPH) * @since : 1.0.0 */ public function ae_admin_required_scripts_frontend(){ //1.0.6 //only enqueue if admin bar is showing if(is_admin_bar_showing()){ wp_enqueue_style( 'ae-admin-customizer-css', plugins_url('/assets/css/style.css', AE_ADMIN_CUSTOMIZER_PLUGIN__FILE__ ), false, '1.0.0'); } } /** * Create AE Admin Customizer Menu * @author Allan Empalmado (AppDevPH) * @since : 1.0.0 */ public function ae_admin_customizer_setting_page_create() { add_menu_page( 'AE Admin Customizer', 'AE Admin Customizer', 'manage_options', 'ae-admin-customizer', array($this, 'ae_admin_customizer_setting_page_render'), plugins_url('/assets/image/icon.png', AE_ADMIN_CUSTOMIZER_PLUGIN__FILE__ ) ,50.45 ); } /** * Render AE Admin Customizer Page * @author Allan Empalmado (AppDevPH) * @since : 1.0.0 */ public function ae_admin_customizer_setting_page_render() { if ( !current_user_can( 'manage_options' ) ) { wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); } $ae_color_options = ( isset( $_GET['tab'] ) && 'admin-panel-styling' === $_GET['tab'] ) ? true : false; $ae_logreg_options = ( isset( $_GET['tab'] ) && 'login-registration-styling' === $_GET['tab'] ) ? true : false; $ae_custom_css_options = ( isset( $_GET['tab'] ) && 'custom-css' === $_GET['tab'] ) ? true : false; $import_export_tab = ( isset( $_GET['tab'] ) && 'import-export' === $_GET['tab'] ) ? true : false; $support_tab = ( isset( $_GET['tab'] ) && 'support' === $_GET['tab'] ) ? true : false; ?>
0){ if(isset($array["general"])){ update_option("ae_admin_customizer_options", $array["general"]); } if(isset($array["admin_panel"])){ update_option("ae_admin_customizer_color_options", $array["admin_panel"]); } if(isset($array["login_registration"])){ update_option("ae_admin_customizer_logreg_options", $array["login_registration"]); } if(isset($array["custom_css"])){ update_option("ae_admin_customizer_custom_css", $array["custom_css"]); } wp_safe_redirect( admin_url( $b_url . "&r=success&msg=" . urlencode(__("Settings has been imported successfully!", "ae-admin-customizer")) ) ); die(); }else{ wp_safe_redirect( admin_url( $b_url . "&r=invalid&msg=" . urlencode(__("No data or invalid data to import!", "ae-admin-customizer")) ) ); } }catch(Exception $e){ wp_safe_redirect( admin_url( $b_url . "&r=error&msg=" . urlencode($e->getMessage()) ) ); } } if(isset($_GET["r"]) && !empty($_GET["r"])){ switch($_GET["r"]){ case "success": ?>