" . __("Customize Login and Registration by setting up the colors for each elements below.", "ae-admin-customizer" ) . "
";
}
/**
* Login & Registration Box Setting Description
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return string
*/
public static function logreg_box_setting_info(){
echo "" . __("Customize Login and Registration Box", "ae-admin-customizer" ) . "
";
}
/**
* Login & Registration Background Image Setting Description
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return string
*/
public static function logreg_bgimage_setting_info(){
echo "" . __("Customize Login and Registration by adding a background image", "ae-admin-customizer" ) . "
";
}
/**
* Customizer Button linked to wordpress customizer for live preview
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_admin_edit_with_live_callback(){
global $wp;
$current_url = admin_url("admin.php?page=ae-admin-customizer&tab=login-registration-styling");
$customize_url = admin_url("customize.php");
$login_page_url = wp_login_url();
$url_with_params = $customize_url . "?return=" . urlencode($current_url) . "&url=" . urlencode($login_page_url);
echo "". __("Customize with Live Preview", "ae-admin-customizer") . "
" . __("Use the setting below if you are having trouble using the Customizer with Live Preview", "ae-admin-customizer") . "";
}
/**
* Basic Setting Background Color Picker
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_bgcolor_picker_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
'',
isset( $options['ae_logreg_bgcolor_picker'] ) ? esc_attr( $options['ae_logreg_bgcolor_picker']) : ''
);
}
/**
* Basic Setting Text Color Picker
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_textcolor_picker_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
'',
isset( $options['ae_logreg_textcolor_picker'] ) ? esc_attr( $options['ae_logreg_textcolor_picker']) : ''
);
}
/**
* Basic Setting Link Color Picker
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_linkcolor_picker_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
'',
isset( $options['ae_logreg_linkcolor_picker'] ) ? esc_attr( $options['ae_logreg_linkcolor_picker']) : ''
);
}
/**
* Basic Setting Button Color Picker
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_buttoncolor_picker_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
'',
isset( $options['ae_logreg_buttoncolor_picker'] ) ? esc_attr( $options['ae_logreg_buttoncolor_picker']) : ''
);
}
/**
* Box Setting Background Color Picker
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_boxcolor_picker_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
'',
isset( $options['ae_logreg_boxcolor_picker'] ) ? esc_attr( $options['ae_logreg_boxcolor_picker']) : ''
);
}
/**
* Box Setting Rounded Corner Checkbox
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_box_rounded_corners_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
$checked = isset( $options['ae_logreg_box_rounded_corners'] ) && $options['ae_logreg_box_rounded_corners'] == 1 ? 'checked' : '';
echo "";
}
/**
* Box Setting Border Radius Numeric Input Field
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_box_border_radius_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
''. __('in pixels', "ae-admin-customizer") .'',
isset( $options['ae_logreg_box_border_radius'] ) ? esc_attr( $options['ae_logreg_box_border_radius']) : 5
);
}
/**
* Box Setting Border Color Picker
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_box_border_color_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
'',
isset( $options['ae_logreg_box_border_color'] ) ? esc_attr( $options['ae_logreg_box_border_color']) : ''
);
}
/**
* Box Setting Border Thickness Input Field
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_box_border_thick_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
''. __('in pixels', "ae-admin-customizer") .'',
isset( $options['ae_logreg_box_border_thick'] ) ? esc_attr( $options['ae_logreg_box_border_thick']) : 5
);
}
/**
* Box Setting Box Width Input Field
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_box_width_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
''. __('in pixels', "ae-admin-customizer") .'',
isset( $options['ae_logreg_box_width'] ) ? esc_attr( $options['ae_logreg_box_width']) : 320
);
}
/**
* Image Background Use Image as Background Checkbox
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_use_image_background_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
$checked = isset( $options['ae_logreg_use_image_background'] ) && $options['ae_logreg_use_image_background'] == 1 ? 'checked' : '';
echo " (" . __("Will default to background color if no image is selected.", "ae-admin-customizer") . ")";
}
/**
* Image Background Preview Image, Select Image Button
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_image_background_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
if(isset($options['ae_logreg_image_background']) && $options['ae_logreg_image_background'] != null && !empty($options['ae_logreg_image_background'])){
$background_image = $options['ae_logreg_image_background'];
}else{
$background_image = plugins_url('/assets/image/no-image.png', AE_ADMIN_CUSTOMIZER_PLUGIN__FILE__ );
}
echo "
";
echo "";
printf(
'',
isset( $options['ae_logreg_image_background'] ) ? esc_attr( $options['ae_logreg_image_background']) : ''
);
}
/**
* Image Background Blend Color Picker
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
* @return html
*/
public static function ae_logreg_image_background_blend_color_callback(){
$options = get_option( 'ae_admin_customizer_logreg_options' );
printf(
'',
isset( $options['ae_logreg_image_background_blend_color'] ) ? esc_attr( $options['ae_logreg_image_background_blend_color']) : ''
);
}
/**
* Enqueue Login Customization Scripts
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
*/
public static function ae_admin_customizer_login_enqueue() {
wp_enqueue_style( 'ae-admin-customizer-login-css', plugins_url('/assets/css/login.css', AE_ADMIN_CUSTOMIZER_PLUGIN__FILE__ ), false, '1.0.0');
wp_enqueue_style( 'wpb-google-fonts', 'https://fonts.googleapis.com/css?family=Lato|Roboto', false );
}
/**
* Implement Configuration and Render the CSS
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
*/
public static function ae_login_page_implement_customization(){
$options = get_option( 'ae_admin_customizer_options' );
$ae_logreg_options = get_option( 'ae_admin_customizer_logreg_options' );
$ae_the_logo = isset($options['ae_admin_dashboard_logo']) && !empty($options['ae_admin_dashboard_logo']) ? $options['ae_admin_dashboard_logo'] : null;
$bg_color = isset( $ae_logreg_options["ae_logreg_bgcolor_picker"] ) && ae_admin_valid_hex_color($ae_logreg_options["ae_logreg_bgcolor_picker"] ) ? $ae_logreg_options["ae_logreg_bgcolor_picker"] : "#f1f1f1";
$use_image_bg = isset( $ae_logreg_options["ae_logreg_use_image_background"] ) && $ae_logreg_options["ae_logreg_use_image_background"] == 1 ? true : false;
$background_image = isset( $ae_logreg_options["ae_logreg_image_background"] ) && !empty($ae_logreg_options["ae_logreg_image_background"]) ? $ae_logreg_options["ae_logreg_image_background"] : false;
$text_color = isset( $ae_logreg_options["ae_logreg_textcolor_picker"] ) && ae_admin_valid_hex_color($ae_logreg_options["ae_logreg_textcolor_picker"]) ? $ae_logreg_options["ae_logreg_textcolor_picker"] : null;
$link_color = isset( $ae_logreg_options["ae_logreg_linkcolor_picker"] ) && ae_admin_valid_hex_color($ae_logreg_options["ae_logreg_linkcolor_picker"]) ? $ae_logreg_options["ae_logreg_linkcolor_picker"] : null;
$button_color = isset( $ae_logreg_options["ae_logreg_buttoncolor_picker"] ) && ae_admin_valid_hex_color($ae_logreg_options["ae_logreg_buttoncolor_picker"]) ? $ae_logreg_options["ae_logreg_buttoncolor_picker"] : null;
$box_color = isset( $ae_logreg_options["ae_logreg_boxcolor_picker"] ) && ae_admin_valid_hex_color($ae_logreg_options["ae_logreg_boxcolor_picker"]) ? $ae_logreg_options["ae_logreg_boxcolor_picker"] : null;
$box_rounded = isset( $ae_logreg_options["ae_logreg_box_rounded_corners"] ) && $ae_logreg_options["ae_logreg_box_rounded_corners"] == 1 ? true : false;
$box_radius = isset( $ae_logreg_options["ae_logreg_box_border_radius"] ) && !empty($ae_logreg_options["ae_logreg_box_border_radius"]) ? absint($ae_logreg_options["ae_logreg_box_border_radius"]) : 0;
$box_border_color = isset( $ae_logreg_options["ae_logreg_box_border_color"] ) && ae_admin_valid_hex_color($ae_logreg_options["ae_logreg_box_border_color"]) ? $ae_logreg_options["ae_logreg_box_border_color"] : null;
$box_border_thick = isset( $ae_logreg_options["ae_logreg_box_border_thick"] ) && !empty($ae_logreg_options["ae_logreg_box_border_thick"]) ? absint($ae_logreg_options["ae_logreg_box_border_thick"]) : 0;
$box_width = isset( $ae_logreg_options["ae_logreg_box_width"] ) && !empty($ae_logreg_options["ae_logreg_box_width"]) ? absint($ae_logreg_options["ae_logreg_box_width"]) : 320;
$blend_color = isset( $ae_logreg_options["ae_logreg_image_background_blend_color"] ) && ae_admin_valid_hex_color($ae_logreg_options["ae_logreg_image_background_blend_color"]) ? $ae_logreg_options["ae_logreg_image_background_blend_color"] : "#FFFFFF";
?>
" . $custom_css_options['ae_custom_css_logreg'] . "" : "";
echo $css_styling;
}
/**
* Login Header URL
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
*/
public static function ae_admin_customizer_login_url() { return home_url(); }
/**
* Login Header Title
* @author Allan Empalmado (AppDevPH)
* @since : 1.0.0
*/
public static function ae_admin_customizer_login_title() { return get_option( 'blogname' ); }
}
new AE_Admin_Login_Registration_Styling();