loginpress_key = get_option( 'loginpress_customization' ); $this->_hooks(); } /** * Hook into actions and filters * * @since 1.0.0 */ private function _hooks() { add_filter( 'login_headerurl', array( $this, 'login_page_logo_url' ) ); add_filter( 'login_headertitle', array( $this, 'login_page_logo_title' ) ); add_filter( 'login_errors', array( $this, 'login_error_messages' ) ); add_filter( 'gettext', array( $this, 'change_lostpassword_message' ) ); add_filter( 'login_message', array( $this, 'change_welcome_message' ) ); add_action( 'customize_register', array( $this, 'customize_login_panel' ) ); add_action( 'login_footer', array( $this, 'login_page_custom_footer' ) ); add_action( 'login_head', array( $this, 'login_page_custom_head' ) ); add_action( 'init', array( $this, 'redirect_to_custom_page' ) ); add_action( 'admin_menu', array( $this, 'menu_url' ), 99 ); add_action( 'customize_controls_enqueue_scripts', array( $this, 'loginpress_customizer_js' ) ); // add_action( 'customize_preview_init', array( $this, 'loginpress_customizer_js' ) ); } function loginpress_customizer_js() { wp_enqueue_script('jquery'); wp_enqueue_script( 'loginpress-customize-control', plugins_url( 'js/customize-controls.js' , __FILE__ ), array( 'jquery', 'customize-preview' ), LOGINPRESS_VERSION, true ); $admin_url = array( 'template_url' => admin_url() ); wp_localize_script( 'loginpress-customize-control', 'admin_url', $admin_url ); $plugin_url = array( 'plugin_url' => plugins_url() ); wp_localize_script( 'loginpress-customize-control', 'plugin_url', $plugin_url ); $login_theme = array( get_option( 'customize_presets_settings', true ) ); wp_localize_script( 'loginpress-customize-control', 'login_theme', $login_theme ); } /** * Register plugin settings Panel in WP Customizer * * @param $wp_customize * @since 1.0.0 */ public function customize_login_panel( $wp_customize ){ include LOGINPRESS_ROOT_PATH .'classes/control-presets' . EXE; // ============================= // = Panel for the LoginPress = // ============================= $wp_customize->add_panel( 'loginpress_panel', array( 'title' => __( 'LoginPress', 'loginpress' ), 'description' => __( 'Customize Your WordPress Login Page with LoginPress :)', 'loginpress' ), 'priority' => 30, ) ); // Start of Presets. // $wp_customize->add_section( 'customize_presets', array( // 'title' => __( 'Themes', 'loginpress' ), // 'description' => __( 'Choose Theme', 'loginpress' ), // 'priority' => 1, // 'panel' => 'loginpress_panel', // ) ); // // $wp_customize->add_setting( 'customize_presets_settings', array( // 'default' => 'default1', // 'type' => 'option', // 'capability' => 'manage_options', // ) ); // // $loginpress_free_templates = array( // 'default1' => array( // 'img' => plugins_url( 'img/bg.jpg', __FILE__ ), // 'thumbnail' => plugins_url( 'img/thumbnail/default-1.png', __FILE__ ), // 'id' => 'default1', // 'name' => 'Default 1' // ), // 'default2' => array( // 'img' => plugins_url( 'img/bg2.jpg', __FILE__ ), // 'thumbnail' => plugins_url( 'img/thumbnail/default-2.png', __FILE__ ), // 'id' => 'default2', // 'name' => 'Default 2' // ), // 'default3' => array( // 'thumbnail' => plugins_url( 'img/thumbnail/default-3.png', __FILE__ ), // 'id' => 'default3', // 'name' => 'Default 3', // 'pro' => 'yes' // ) // // ); // $loginpress_templates = apply_filters( 'loginpress_pro_add_template', $loginpress_free_templates ); // // $wp_customize->add_control( new LoginPress_Presets( $wp_customize, 'customize_presets_settings', // array( // 'section' => 'customize_presets', // // 'label' => __( 'Themes', 'loginpress' ), // 'choices' => $loginpress_templates // ) // ) // ); //End of Presets. // ============================= // = Section for Login Logo = // ============================= $wp_customize->add_section( 'customize_logo_section', array( 'title' => __( 'Logo', 'loginpress' ), 'description' => __( 'Customize Your Logo Section', 'loginpress' ), 'priority' => 5, 'panel' => 'loginpress_panel', )); $wp_customize->add_setting( 'loginpress_customization[setting_logo]', array( 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'setting_logo', array( 'label' => __( 'Logo Image:', 'loginpress' ), 'section' => 'customize_logo_section', 'priority' => 5, 'settings' => 'loginpress_customization[setting_logo]' ))); $logo_control = array( 'customize_logo_width', 'customize_logo_height', 'customize_logo_padding', 'customize_logo_hover', 'customize_logo_hover_title' ); $logo_default = array( '84px', '84px', '5px', '', '' ); $logo_label = array( __( 'Logo Width:', 'loginpress' ), __( 'Logo Height:', 'loginpress' ), __( 'Padding Bottom:', 'loginpress' ), __( 'Logo URL:', 'loginpress' ), __( 'Logo Hover Title:', 'loginpress' ) ); $logo = 0; while ( $logo < 5 ) : $wp_customize->add_setting( "loginpress_customization[{$logo_control[$logo]}]", array( 'default' => $logo_default[$logo], 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( $logo_control[$logo], array( 'label' => $logo_label[$logo], 'section' => 'customize_logo_section', 'priority' => 10, 'settings' => "loginpress_customization[{$logo_control[$logo]}]" )); $logo++; endwhile; // ============================= // = Section for Background = // ============================= $wp_customize->add_section( 'section_background', array( 'title' => __( 'Background', 'loginpress' ), 'description' => '', 'priority' => 10, 'panel' => 'loginpress_panel', )); $wp_customize->add_setting('loginpress_customization[loginpress_display_bg]', array( 'default' => true, 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control('loginpress_display_bg', array( 'settings' => 'loginpress_customization[loginpress_display_bg]', 'label' => __( 'Display Background Image?', 'loginpress'), 'section' => 'section_background', 'priority' => 5, 'type' => 'checkbox', )); $wp_customize->add_setting( 'loginpress_customization[setting_background_color]', array( // 'default' => '#ddd5c3', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'setting_background_color', array( 'label' => __( 'Background Color:', 'loginpress' ), 'section' => 'section_background', 'priority' => 10, 'settings' => 'loginpress_customization[setting_background_color]' ))); $wp_customize->add_setting( 'loginpress_customization[setting_background]', array( // 'default' => plugins_url( 'img/bg.jpg', __FILE__ ) , 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'setting_background', array( 'label' => __( 'Background Image:', 'loginpress' ), 'section' => 'section_background', 'priority' => 15, 'settings' => 'loginpress_customization[setting_background]', ))); $wp_customize->add_setting( 'loginpress_customization[background_repeat_radio]', array( 'default' => 'no-repeat', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'background_repeat_radio', array( 'label' => __( 'Background Repeat:', 'loginpress' ), 'section' => 'section_background', 'priority' => 20, 'settings' => 'loginpress_customization[background_repeat_radio]', 'type' => 'radio', 'choices' => array( 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y', 'no-repeat' => 'no-repeat', 'initial' => 'initial', 'inherit' => 'inherit', ), )); $wp_customize->add_setting( 'loginpress_customization[background_position]', array( 'default' => 'center', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'background_position', array( 'settings' => 'loginpress_customization[background_position]', 'label' => __( 'Select Position:', 'loginpress' ), 'section' => 'section_background', 'priority' => 25, 'type' => 'select', 'choices' => array( 'left top' => 'left top', 'left center' => 'left center', 'left bottom' => 'left bottom', 'right top' => 'right top', 'right center' => 'right center', 'right bottom' => 'right bottom', 'center top' => 'center top', 'center' => 'center', 'center bottom' => 'center bottom', ), )); $wp_customize->add_setting( 'loginpress_customization[background_image_size]', array( 'default' => 'cover', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'background_image_size', array( 'label' => __( 'Background Image Size: ', 'loginpress' ), 'section' => 'section_background', 'priority' => 30, 'settings' => 'loginpress_customization[background_image_size]', 'type' => 'select', 'choices' => array( 'auto' => 'auto', 'cover' => 'cover', 'contain' => 'contain', 'initial' => 'initial', 'inherit' => 'inherit', ), )); // ============================= // = Section for Form Beauty = // ============================= $wp_customize->add_section( 'section_form', array( 'title' => __( 'Customize Login Form', 'loginpress' ), 'description' => '', 'priority' => 15, 'panel' => 'loginpress_panel', )); $wp_customize->add_setting( 'loginpress_customization[setting_form_background]', array( 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'setting_form_background', array( 'label' => __( 'Form Background Image', 'loginpress' ), 'section' => 'section_form', 'priority' => 5, 'settings' => 'loginpress_customization[setting_form_background]' ))); $form_control = array( 'customize_form_width', 'customize_form_height', 'customize_form_padding', 'customize_form_border', 'textfield_width', 'textfield_margin' ); $form_default = array( '350px', '200px', '26px 24px 46px', '', '100%', '2px 6px 16px 0px' ); $form_label = array( __( 'Form Width:', 'loginpress' ), __( 'Form Minimum Height:', 'loginpress' ), __( 'Form Padding:', 'loginpress' ), __( 'Border (Example: 2px dotted black):', 'loginpress' ), __( 'Input Text Field Width:', 'loginpress' ), __( 'Input Text Field Margin:', 'loginpress' ) ); $form = 0; while ( $form < 6 ) : $wp_customize->add_setting( "loginpress_customization[{$form_control[$form]}]", array( 'default' => $form_default[$form], 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( $form_control[$form], array( 'label' => $form_label[$form], 'section' => 'section_form', // 'priority' => 15, 'settings' => "loginpress_customization[{$form_control[$form]}]" )); $form++; endwhile; $form_color_control = array( 'form_background_color', 'textfield_background_color', 'textfield_color', 'textfield_label_color' ); $form_color_default = array( '#FFF', '#FFF', '#333', '#777' ); $form_color_label = array( __( 'Form Background Color:', 'loginpress' ), __( 'Input Field Background Color:', 'loginpress' ), __( 'Input Field Text Color:', 'loginpress' ), __( 'Label Color:', 'loginpress' ), ); $form_color = 0; while ( $form_color < 4 ) : $wp_customize->add_setting( "loginpress_customization[{$form_color_control[$form_color]}]", array( // 'default' => $form_color_default[$form_color], 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $form_color_control[$form_color], array( 'label' => $form_color_label[$form_color], 'section' => 'section_form', // 'priority' => 50, 'settings' => "loginpress_customization[{$form_color_control[$form_color]}]" ) ) ); $form_color++; endwhile; // ============================= // = Section for Forget Form = // ============================= $wp_customize->add_section( 'section_forget_form', array( 'title' => __( 'Customize Forget Form', 'loginpress' ), 'description' => '', 'priority' => 20, 'panel' => 'loginpress_panel', )); $wp_customize->add_setting( 'loginpress_customization[forget_form_background]', array( 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'forget_form_background', array( 'label' => __( 'Forget Form Background Image', 'loginpress' ), 'section' => 'section_forget_form', 'priority' => 5, 'settings' => 'loginpress_customization[forget_form_background]' ))); $wp_customize->add_setting( 'loginpress_customization[forget_form_background_color]', array( // 'default' => '#FFF', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'forget_form_background_color', array( 'label' => __( 'Forget Form Background Color', 'loginpress' ), 'section' => 'section_forget_form', 'priority' => 10, 'settings' => 'loginpress_customization[forget_form_background_color]' ))); // ============================= // = Section for Button Style = // ============================= $wp_customize->add_section( 'section_button', array( 'title' => __( 'Button Beauty', 'loginpress' ), 'description' => '', 'priority' => 25, 'panel' => 'loginpress_panel', )); $button_control = array( 'custom_button_color', 'button_border_color', 'button_hover_color', 'button_hover_border', 'custom_button_shadow', 'button_text_color' ); $button_default = array( '#2EA2CC', '#0074A2', '#1E8CBE', '#0074A2', '#78C8E6', '#FFF' ); $button_label = array( __( 'Button Color:', 'loginpress' ), __( 'Button Border Color:', 'loginpress' ), __( 'Button Color (Hover):', 'loginpress' ), __( 'Button Border (Hover):', 'loginpress' ), __( 'Button Box Shadow:', 'loginpress' ), __( 'Button Text Color:', 'loginpress' ) ); $button = 0; while ( $button < 6 ) : $wp_customize->add_setting( "loginpress_customization[{$button_control[$button]}]", array( // 'default' => $button_default[$button], 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $button_control[$button], array( 'label' => $button_label[$button], 'section' => 'section_button', 'priority' => 5, 'settings' => "loginpress_customization[{$button_control[$button]}]" ) ) ); $button++; endwhile; // ============================= // = Section for Error message = // ============================= $wp_customize->add_section( 'section_error', array( 'title' => __( 'Error Messages', 'loginpress' ), 'description' => '', 'priority' => 30, 'panel' => 'loginpress_panel', )); $error_control = array( 'incorrect_username', 'incorrect_password', 'empty_username', 'empty_password', 'invalid_email', 'empty_email', 'invalidcombo_message' ); $error_default = array( 'Incorrect Username', 'Incorrect Password', 'Empty Username', 'Empty Password', 'The email address is incorrect.', 'The email address is empty.', 'Invalid Username or Email.' ); $error_label = array( __( 'Incorrect Username Message:', 'loginpress' ), __( 'Incorrect Password Message:', 'loginpress' ), __( 'Empty Username Message:', 'loginpress' ), __( 'Empty Password Message:', 'loginpress' ), __( 'Invalid Email Message:', 'loginpress' ), __( 'Empty Email Message:', 'loginpress' ), __( 'Forget Password Message:', 'loginpress' ), ); $error = 0; while ( $error < 7 ) : $wp_customize->add_setting( "loginpress_customization[{$error_control[$error]}]", array( 'default' => $error_default[$error], 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( $error_control[$error], array( 'label' => $error_label[$error], 'section' => 'section_error', 'priority' => 5, 'settings' => "loginpress_customization[{$error_control[$error]}]", )); $error++; endwhile; // ============================= // = Section for Welcome message // ============================= $wp_customize->add_section( 'section_welcome', array( 'title' => __( 'Welcome Messages', 'loginpress' ), 'description' => '', 'priority' => 35, 'panel' => 'loginpress_panel', )); $welcome_control = array( 'lostpwd_welcome_message', 'welcome_message', 'register_welcome_message', 'logout_message', 'message_background_border' ); $welcome_default = array( 'Forget ?', 'Welcome', 'Register yourself', 'Logout', '' ); $welcome_label = array( __( 'Welcome Message on Lost Password:', 'loginpress' ), __( 'Welcome Message on Front Page:', 'loginpress' ), __( 'Welcome Message on Registration:', 'loginpress' ), __( 'Logout Message:', 'loginpress' ), __( 'Message Field Border: ( Example: 1px solid #00a0d2; )', 'loginpress' ), ); $welcome = 0; while ( $welcome < 5 ) : $wp_customize->add_setting( "loginpress_customization[{$welcome_control[ $welcome ]}]", array( 'default' => $welcome_default[ $welcome ], 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( $welcome_control[ $welcome ], array( 'label' => $welcome_label[ $welcome ], 'section' => 'section_welcome', 'priority' => 5, 'settings' => "loginpress_customization[{$welcome_control[ $welcome ]}]", )); $welcome++; endwhile; $wp_customize->add_setting( 'loginpress_customization[message_background_color]', array( // 'default' => '#fff', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'message_background_color', array( 'label' => __( 'Message Field Background Color:', 'loginpress' ), 'section' => 'section_welcome', 'priority' => 30, 'settings' => 'loginpress_customization[message_background_color]' ))); // ============================= // = Section for Header message // ============================= // $wp_customize->add_section( // 'section_head', // array( // 'title' => __( 'Header Message', 'loginpress' ), // 'description' => '', // 'priority' => 35, // 'panel' => 'loginpress_panel', // )); // // $wp_customize->add_setting( 'loginpress_customization[login_hearder_message]', array( // 'default' => 'Latest NEWS', // 'type' => 'option', // 'capability' => 'edit_theme_options', // )); // // $wp_customize->add_control( 'login_hearder_message', array( // 'label' => __( 'Header Message:', 'loginpress' ), // 'section' => 'section_head', // 'priority' => 5, // 'settings' => 'loginpress_customization[login_hearder_message]', // )); // // $wp_customize->add_setting( 'loginpress_customization[login_hearder_message_link]', array( // 'default' => '#', // 'type' => 'option', // 'capability' => 'edit_theme_options', // )); // // $wp_customize->add_control( 'login_hearder_message_link', array( // 'label' => __( 'Header Message Link:', 'loginpress' ), // 'section' => 'section_head', // 'priority' => 5, // 'settings' => 'loginpress_customization[login_hearder_message_link]', // )); // // $wp_customize->add_setting( 'loginpress_customization[login_head_color]', array( // 'default' => '#17a8e3', // 'type' => 'option', // 'capability' => 'edit_theme_options', // )); // // $wp_customize->add_control( // new WP_Customize_Color_Control( // $wp_customize, // 'login_head_color', // array( // 'label' => __( 'Header Text Color:', 'loginpress' ), // 'section' => 'section_head', // 'priority' => 10, // 'settings' => 'loginpress_customization[login_head_color]' // ))); // // $wp_customize->add_setting( 'loginpress_customization[login_head_color_hover]', array( // // 'default' => '#17a8e3', // 'type' => 'option', // 'capability' => 'edit_theme_options', // )); // // $wp_customize->add_control( // new WP_Customize_Color_Control( // $wp_customize, // 'login_head_color_hover', // array( // 'label' => __( 'Header Text Hover Color:', 'loginpress' ), // 'section' => 'section_head', // 'priority' => 15, // 'settings' => 'loginpress_customization[login_head_color_hover]' // ))); // // $wp_customize->add_setting( 'loginpress_customization[login_head_font_size]', array( // 'default' => '13px;', // 'type' => 'option', // 'capability' => 'edit_theme_options', // )); // // $wp_customize->add_control( 'login_head_font_size', array( // 'label' => __( 'Text Font Size:', 'loginpress' ), // 'section' => 'section_head', // 'priority' => 20, // 'settings' => 'loginpress_customization[login_head_font_size]', // )); // // $wp_customize->add_setting( 'loginpress_customization[login_head_bg_color]', array( // // 'default' => '#17a8e3', // 'type' => 'option', // 'capability' => 'edit_theme_options', // )); // // $wp_customize->add_control( // new WP_Customize_Color_Control( // $wp_customize, // 'login_head_bg_color', // array( // 'label' => __( 'Header Background Color:', 'loginpress' ), // 'section' => 'section_head', // 'priority' => 25, // 'settings' => 'loginpress_customization[login_head_bg_color]' // ))); // ============================= // = Custom Header Login menu = // ============================= // $menuVals = array(); // $menus = get_registered_nav_menus(); // // foreach ( $menus as $location => $name ) { // $menuVals[$location] = $name ; // } // $wp_customize->add_section( // 'customize_menu_section', // array( // 'title' => __( 'Login Page Menus', 'loginpress' ), // 'description' => '', // 'priority' => 32, // 'panel' => 'loginpress_panel', // )); // // $wp_customize->add_setting('loginpress_customization[header_login_menu]', array( // 'capability' => 'edit_theme_options', // 'type' => 'option', // )); // // $wp_customize->add_control('header_login_menu', array( // 'settings' => 'loginpress_customization[header_login_menu]', // 'label' => __( 'Display Header Menu?', 'loginpress'), // 'section' => 'customize_menu_section', // 'priority' => 5, // 'type' => 'checkbox', // )); // // $wp_customize->add_setting('loginpress_customization[customize_login_menu]', array( // 'capability' => 'edit_theme_options', // 'type' => 'option', // // )); // $wp_customize->add_control( 'customize_login_menu', array( // 'settings' => 'loginpress_customization[customize_login_menu]', // 'label' => __( 'Select Menu for Header:', 'loginpress' ), // 'section' => 'customize_menu_section', // 'type' => 'select', // 'priority' => 10, // 'choices' => $menuVals, // )); // // $wp_customize->add_setting('loginpress_customization[footer_login_menu]', array( // 'capability' => 'edit_theme_options', // 'type' => 'option', // )); // // $wp_customize->add_control('footer_login_menu', array( // 'settings' => 'loginpress_customization[footer_login_menu]', // 'label' => __( 'Display Footer Menu?', 'loginpress' ), // 'section' => 'customize_menu_section', // 'priority' => 15, // 'type' => 'checkbox', // )); // // $wp_customize->add_setting('loginpress_customization[customize_login_footer_menu]', array( // 'capability' => 'edit_theme_options', // 'type' => 'option', // // )); // $wp_customize->add_control( 'customize_login_footer_menu', array( // 'settings' => 'loginpress_customization[customize_login_footer_menu]', // 'label' => __( 'Select Menu:', 'loginpress' ), // 'section' => 'customize_menu_section', // 'priority' => 20, // 'type' => 'select', // 'choices' => $menuVals, // )); // ============================= // = Section for Form Footer = // ============================= $wp_customize->add_section( 'section_fotter', array( 'title' => __( 'Form Footer', 'loginpress' ), 'description' => '', 'priority' => 40, 'panel' => 'loginpress_panel', )); $wp_customize->add_setting( 'loginpress_customization[login_footer_text]', array( 'default' => 'Lost your password?', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'login_footer_text', array( 'label' => __( 'Lost Password Text', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 5, 'settings' => 'loginpress_customization[login_footer_text]', )); $wp_customize->add_setting( 'loginpress_customization[footer_display_text]', array( 'default' => 'block', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'footer_display_text', array( 'label' => __( 'Footer Text Display:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 10, 'settings' => 'loginpress_customization[footer_display_text]', 'type' => 'radio', 'choices' => array( 'block' => 'show', 'none' => 'hide', ), )); $wp_customize->add_setting( 'loginpress_customization[login_footer_text_decoration]', array( 'default' => 'none', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'login_footer_text_decoration', array( 'settings' => 'loginpress_customization[login_footer_text_decoration]', 'label' => 'Select Text Decoration:', 'section' => 'section_fotter', 'priority' => 15, 'type' => 'select', 'choices' => array( 'none' => 'none', 'overline' => 'overline', 'line-through' => 'line-through', 'underline' => 'underline', ), )); $wp_customize->add_setting( 'loginpress_customization[login_footer_color]', array( // 'default' => '#17a8e3', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'login_footer_color', array( 'label' => __( 'Footer Text Color:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 20, 'settings' => 'loginpress_customization[login_footer_color]' ))); $wp_customize->add_setting( 'loginpress_customization[login_footer_color_hover]', array( // 'default' => '#17a8e3', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'login_footer_color_hover', array( 'label' => __( 'Footer Text Hover Color:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 25, 'settings' => 'loginpress_customization[login_footer_color_hover]' ))); $wp_customize->add_setting( 'loginpress_customization[login_footer_font_size]', array( 'default' => '13px', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'login_footer_font_size', array( 'label' => __( 'Text Font Size:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 30, 'settings' => 'loginpress_customization[login_footer_font_size]', )); $wp_customize->add_setting( 'loginpress_customization[login_footer_bg_color]', array( // 'default' => '#17a8e3', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'login_footer_bg_color', array( 'label' => __( 'Footer Background Color:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 35, 'settings' => 'loginpress_customization[login_footer_bg_color]' ))); // Fields for Back Link // $wp_customize->add_setting( 'login_back_text', array( // 'default' => 'Lost your password?', // 'type' => 'option', // 'capability' => 'edit_theme_options', // )); // $wp_customize->add_control( 'login_back_text', array( // 'label' => __( 'Lost Password Text', 'loginpress' ), // 'section' => 'section_fotter', // 'priority' => 40, // 'settings' => 'login_back_text', // )); $wp_customize->add_setting( 'loginpress_customization[back_display_text]', array( 'default' => 'block', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'back_display_text', array( 'label' => __( '"Back to" Text Display:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 45, 'settings' => 'loginpress_customization[back_display_text]', 'type' => 'radio', 'choices' => array( 'block' => 'show', 'none' => 'hide', ), )); $wp_customize->add_setting( 'loginpress_customization[login_back_text_decoration]', array( 'default' => 'none', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'login_back_text_decoration', array( 'settings' => 'loginpress_customization[login_back_text_decoration]', 'label' => __( '"Back to" Text Decoration:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 50, 'type' => 'select', 'choices' => array( 'none' => 'none', 'overline' => 'overline', 'line-through' => 'line-through', 'underline' => 'underline', ), )); $wp_customize->add_setting( 'loginpress_customization[login_back_color]', array( // 'default' => '#17a8e3', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'login_back_color', array( 'label' => __( '"Back to" Text Color:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 55, 'settings' => 'loginpress_customization[login_back_color]' ))); $wp_customize->add_setting( 'loginpress_customization[login_back_color_hover]', array( // 'default' => '#17a8e3', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'login_back_color_hover', array( 'label' => __( '"Back to" Text Hover Color:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 60, 'settings' => 'loginpress_customization[login_back_color_hover]' ))); $wp_customize->add_setting( 'loginpress_customization[login_back_font_size]', array( 'default' => '13px;', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'login_back_font_size', array( 'label' => __( '"Back to" Text Font Size:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 65, 'settings' => 'loginpress_customization[login_back_font_size]', )); $wp_customize->add_setting( 'loginpress_customization[login_back_bg_color]', array( // 'default' => '#17a8e3', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'login_back_bg_color', array( 'label' => __( 'Footer Background Color:', 'loginpress' ), 'section' => 'section_fotter', 'priority' => 70, 'settings' => 'loginpress_customization[login_back_bg_color]' ))); $wp_customize->add_setting( 'loginpress_customization[login_footer_copy_right]', array( 'default' => '© 2017 WPBrigade, All Rights Reserved.', 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'login_footer_copy_right', array( 'label' => __( 'Copyright Note:', 'loginpress' ), 'type' => 'textarea', 'section' => 'section_fotter', 'priority' => 75, 'settings' => 'loginpress_customization[login_footer_copy_right]' )); // ============================= // = Section for Custom CSS = // ============================= $wp_customize->add_section( 'section_css', array( 'title' => __( 'Custom CSS', 'loginpress' ), 'description' => '', 'priority' => 50, 'panel' => 'loginpress_panel', )); $wp_customize->add_setting( 'loginpress_customization[loginpress_custom_css]', array( 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'loginpress_custom_css', array( 'label' => __( 'Customize CSS', 'loginpress' ), 'type' => 'textarea', 'section' => 'section_css', 'priority' => 5, 'settings' => 'loginpress_customization[loginpress_custom_css]' )); // ============================= // = Section for Custom JS = // ============================= $wp_customize->add_section( 'section_js', array( 'title' => __( 'Custom JS', 'loginpress' ), 'description' => '', 'priority' => 55, 'panel' => 'loginpress_panel', )); $wp_customize->add_setting( 'loginpress_customization[loginpress_custom_js]', array( 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage' )); $wp_customize->add_control( 'loginpress_custom_js', array( 'label' => __( 'Customize JS', 'loginpress' ), 'type' => 'textarea', 'section' => 'section_js', 'priority' => 5, 'settings' => 'loginpress_customization[loginpress_custom_js]' )); // Resets Panel // $wp_customize->add_section( 'reset_loginpress', array( // 'title' => __( 'Reset All Settings', 'loginpress' ), // 'description' => '', // 'priority' => 60, // 'panel' => 'loginpress_panel', // ) ); // // $wp_customize->add_setting( 'reset_loginpress', array( // 'type' => 'option', // 'capability' => 'manage_options', // ) ); // // $wp_customize->add_control( 'reset_loginpress', array( // 'label' => __( 'Reset All Settings', 'loginpress' ), // 'type' => 'checkbox', // 'section' => 'reset_loginpress', // 'priority' => 5, // 'settings' => 'reset_loginpress' // ) ); } /** * Manage the Login Footer Links * * @since 1.0.0 * * * * * * * * * * * * * * * */ public function login_page_custom_footer() { if ( $this->loginpress_key ) { // echo ''; echo '
'; } } /** * Manage the Login Head * * @since 1.0.0 * * * * * * * * * * * */ public function login_page_custom_head() { // Include CSS File in heared. include( LOGINPRESS_DIR_PATH . 'css/style-presets' . EXE ); include( LOGINPRESS_DIR_PATH . 'css/style-login' . EXE ); if ( $this->loginpress_key && array_key_exists( 'header_login_menu', $this->loginpress_key ) ) { // echo '