get_option( 'jn_admin_tailor_login_logo_id' ), 'jn_admin_tailor_login_color' => get_option( 'jn_admin_tailor_login_color' ), 'jn_admin_tailor_login_footer_color' => get_option( 'jn_admin_tailor_login_footer_color' ), 'jn_admin_tailor_login_pattern_url' => get_option( 'jn_admin_tailor_login_pattern_url' ), 'jn_admin_tailor_bg_image_id' => get_option( 'jn_admin_tailor_bg_image_id' ), 'jn_admin_tailor_custom_css' => get_option( 'jn_admin_tailor_custom_css' ), 'jn_admin_tailor_form_border_radius' => get_option( 'jn_admin_tailor_form_border_radius' ), 'jn_admin_tailor_form_box_shadow' => get_option( 'jn_admin_tailor_form_box_shadow' ), 'jn_admin_tailor_form_transparency' => get_option( 'jn_admin_tailor_form_transparency' ), 'jn_admin_tailor_logo_border_radius' => get_option( 'jn_admin_tailor_logo_border_radius' ), 'jn_admin_tailor_admin_bar_color' => get_option( 'jn_admin_tailor_admin_bar_color' ), 'jn_admin_tailor_menu_highlight_color' => get_option( 'jn_admin_tailor_menu_highlight_color' ), 'jn_admin_tailor_hide_wp_logo' => get_option( 'jn_admin_tailor_hide_wp_logo' ), 'jn_admin_tailor_hide_welcome_panel' => get_option( 'jn_admin_tailor_hide_welcome_panel' ), 'jn_admin_tailor_admin_footer_text' => get_option( 'jn_admin_tailor_admin_footer_text' ), 'jn_admin_tailor_custom_login_error' => get_option( 'jn_admin_tailor_custom_login_error' ) ); $filename = 'admin-tailor-settings-' . date( 'Y-m-d-H-i-s' ) . '.json'; header( 'Content-Type: application/json' ); header( 'Content-Disposition: attachment; filename="' . $filename . '"' ); echo json_encode( $settings, JSON_PRETTY_PRINT ); exit; } // Handle import functionality if ( isset( $_POST['import_settings'] ) ) { // Check if file was uploaded if ( ! isset( $_FILES['import_file'] ) || empty( $_FILES['import_file']['name'] ) ) { $redirect_url = admin_url( 'options-general.php?page=admin-tailor&import=error&reason=no_file' ); wp_redirect( $redirect_url ); exit; } $file = $_FILES['import_file']; // Check for upload errors if ( $file['error'] !== UPLOAD_ERR_OK ) { $redirect_url = admin_url( 'options-general.php?page=admin-tailor&import=error&reason=upload_error' ); wp_redirect( $redirect_url ); exit; } // Check file size (max 1MB) if ( $file['size'] > 1024 * 1024 ) { $redirect_url = admin_url( 'options-general.php?page=admin-tailor&import=error&reason=file_too_large' ); wp_redirect( $redirect_url ); exit; } // Check file extension $file_extension = strtolower( pathinfo( $file['name'], PATHINFO_EXTENSION ) ); if ( $file_extension !== 'json' ) { $redirect_url = admin_url( 'options-general.php?page=admin-tailor&import=error&reason=invalid_file_type' ); wp_redirect( $redirect_url ); exit; } // Read and validate file content $import_data = file_get_contents( $file['tmp_name'] ); if ( empty( $import_data ) ) { $redirect_url = admin_url( 'options-general.php?page=admin-tailor&import=error&reason=empty_file' ); wp_redirect( $redirect_url ); exit; } // Parse JSON $settings = json_decode( $import_data, true ); if ( json_last_error() !== JSON_ERROR_NONE || ! is_array( $settings ) ) { $redirect_url = admin_url( 'options-general.php?page=admin-tailor&import=error&reason=invalid_json' ); wp_redirect( $redirect_url ); exit; } // Validate that it contains Admin Tailor settings $valid_settings = false; foreach ( $settings as $key => $value ) { if ( strpos( $key, 'jn_admin_tailor_' ) === 0 ) { $valid_settings = true; break; } } if ( ! $valid_settings ) { $redirect_url = admin_url( 'options-general.php?page=admin-tailor&import=error&reason=no_valid_settings' ); wp_redirect( $redirect_url ); exit; } // Import the settings foreach ( $settings as $key => $value ) { if ( strpos( $key, 'jn_admin_tailor_' ) === 0 ) { update_option( $key, $value ); } } $redirect_url = admin_url( 'options-general.php?page=admin-tailor&import=success' ); wp_redirect( $redirect_url ); exit; } // Save the options. update_option( 'jn_admin_tailor_login_logo_id', $logo_id ); update_option( 'jn_admin_tailor_login_color', $login_color_palette ); update_option( 'jn_admin_tailor_login_footer_color', $login_footer_color ); update_option( 'jn_admin_tailor_login_pattern_url', $login_pattern_url ); update_option( 'jn_admin_tailor_bg_image_id', $bg_image_id ); update_option( 'jn_admin_tailor_custom_css', $custom_css ); update_option( 'jn_admin_tailor_form_border_radius', $form_border_radius ); update_option( 'jn_admin_tailor_form_box_shadow', $form_box_shadow ); update_option( 'jn_admin_tailor_form_transparency', $form_transparency ); update_option( 'jn_admin_tailor_logo_border_radius', $logo_border_radius ); update_option( 'jn_admin_tailor_admin_bar_color', $admin_bar_color ); update_option( 'jn_admin_tailor_menu_highlight_color', $menu_highlight_color ); update_option( 'jn_admin_tailor_hide_wp_logo', $hide_wp_logo ); update_option( 'jn_admin_tailor_hide_welcome_panel', $hide_welcome_panel ); update_option( 'jn_admin_tailor_admin_footer_text', $admin_footer_text ); update_option( 'jn_admin_tailor_custom_login_error', $custom_login_error ); // Show success notice. add_action( 'admin_notices', function() { echo '

Settings saved successfully.

'; } ); } function jn_admin_tailor_add_settings_page_content() { // Show reset success message if redirected after reset if ( isset( $_GET['reset'] ) && 'success' === $_GET['reset'] ) { echo '

All settings have been reset to defaults.

'; } // Show import success message if ( isset( $_GET['import'] ) && 'success' === $_GET['import'] ) { echo '

Settings imported successfully!

'; } // Show import error messages if ( isset( $_GET['import'] ) && 'error' === $_GET['import'] && isset( $_GET['reason'] ) ) { $error_messages = array( 'no_file' => 'Please select a file to import.', 'upload_error' => 'File upload failed. Please try again.', 'file_too_large' => 'File is too large. Maximum size is 1MB.', 'invalid_file_type' => 'Invalid file type. Please upload a .json file.', 'empty_file' => 'The uploaded file is empty.', 'invalid_json' => 'Invalid JSON file. Please check the file format.', 'no_valid_settings' => 'No valid Admin Tailor settings found in the file.' ); $reason = sanitize_text_field( $_GET['reason'] ); $error_message = isset( $error_messages[ $reason ] ) ? $error_messages[ $reason ] : 'Import failed. Please try again.'; echo '

Import Error: ' . esc_html( $error_message ) . '

'; } $image_id = get_option( 'jn_admin_tailor_login_logo_id' ); $image = wp_get_attachment_image_url( $image_id ); $login_color_palette = get_option( 'jn_admin_tailor_login_color' ); $login_footer_color = get_option( 'jn_admin_tailor_login_footer_color' ); ?>

Login Page

Logo Remove logo Upload image

Logo size should be 84px x 84px.

px

Set border radius for the login logo (0-50px).

Color for border, button, input etc.

Color for lost your password, go to website, and privacy policy links.

  • ✓' : '' ?> Pattern

Login page background pattern.

Background Remove background image Upload background image

Upload a custom background image. This will override the selected pattern.

Add custom CSS for the login page. CSS should be written without <style> tags.

px

Set border radius for the login form (0-50px).

%

Set box shadow intensity for the login form (0-100%).

%

Set transparency for the login form (10-100%). Lower values make it more transparent.

Dashboard

Customize your WordPress dashboard appearance and branding.

Customize WordPress admin bar background color.

Customize admin menu active/hover highlight color.

Remove the WordPress logo from the top admin bar.

Remove the welcome panel from the dashboard for all users.

Custom text for admin dashboard footer (replaces WordPress branding).

Custom error message for failed login attempts (leave empty for default).

Download your current settings as a backup file.


Upload a previously exported settings file to restore. File selection is required.

Do you need help with Jetpack CRM?