Version Description
- 2017-01-24 =
- Bug fix: Color and Background management fixed and themes launch.
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Custom Login Page Customizer | LoginPress |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
- classes/control-presets.php +1 -1
- css/style-login.php +16 -1
- css/style-presets.php +2 -2
- css/themes/default-1.php +1 -1
- css/themes/default-2.php +15 -5
- custom.php +55 -29
- img/thumbnail/default-4.jpg +0 -0
- img/thumbnail/v18.jpg +0 -0
- img/thumbnail/v9.jpg +0 -0
- js/customize-controls.js +112 -2
- loginpress.php +16 -4
- readme.txt +7 -4
classes/control-presets.php
CHANGED
@@ -26,7 +26,7 @@ class LoginPress_Presets extends WP_Customize_Control {
|
|
26 |
*/
|
27 |
public function enqueue() {
|
28 |
// wp_enqueue_script( 'jt-customize-controls', plugins_url( '/customize-controls.js' , __FILE__ ), array( 'jquery' ) );
|
29 |
-
wp_enqueue_script( 'jquery-ui-button' );
|
30 |
}
|
31 |
|
32 |
/**
|
26 |
*/
|
27 |
public function enqueue() {
|
28 |
// wp_enqueue_script( 'jt-customize-controls', plugins_url( '/customize-controls.js' , __FILE__ ), array( 'jquery' ) );
|
29 |
+
// wp_enqueue_script( 'jquery-ui-button' );
|
30 |
}
|
31 |
|
32 |
/**
|
css/style-login.php
CHANGED
@@ -22,6 +22,16 @@ function loginpress_get_option_key( $loginpress_key, $loginpress_array ) {
|
|
22 |
}
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array );
|
26 |
$loginpress_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array );
|
27 |
$loginpress_logo_height = loginpress_get_option_key( 'customize_logo_height', $loginpress_array );
|
@@ -76,6 +86,9 @@ $loginpress_footer_link_bg_clr = loginpress_get_option_key( 'login_footer_backgr
|
|
76 |
$loginpress_custom_css = loginpress_get_option_key( 'loginpress_custom_css', $loginpress_array );
|
77 |
$loginpress_custom_js = loginpress_get_option_key( 'loginpress_custom_js', $loginpress_array );
|
78 |
|
|
|
|
|
|
|
79 |
|
80 |
// ob_start();
|
81 |
?>
|
@@ -85,8 +98,10 @@ $loginpress_custom_js = loginpress_get_option_key( 'loginpress_custom_js',
|
|
85 |
}
|
86 |
body.login {
|
87 |
|
88 |
-
<?php if ( ! empty( $loginpress_background_img ) ) : ?>
|
89 |
background-image: url(<?php echo $loginpress_background_img; ?>);
|
|
|
|
|
90 |
<?php endif; ?>
|
91 |
<?php if ( ! empty( $loginpress_background_color ) ) : ?>
|
92 |
background-color: <?php echo $loginpress_background_color; ?>;
|
22 |
}
|
23 |
}
|
24 |
|
25 |
+
function loginpress_bg_option( $loginpress_key, $loginpress_array ) {
|
26 |
+
|
27 |
+
if ( array_key_exists( $loginpress_key, $loginpress_array ) ) {
|
28 |
+
|
29 |
+
return $loginpress_array[ $loginpress_key ];
|
30 |
+
} else {
|
31 |
+
return true;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array );
|
36 |
$loginpress_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array );
|
37 |
$loginpress_logo_height = loginpress_get_option_key( 'customize_logo_height', $loginpress_array );
|
86 |
$loginpress_custom_css = loginpress_get_option_key( 'loginpress_custom_css', $loginpress_array );
|
87 |
$loginpress_custom_js = loginpress_get_option_key( 'loginpress_custom_js', $loginpress_array );
|
88 |
|
89 |
+
$loginpress_display_bg =
|
90 |
+
// array_key_exists( 'loginpress_display_bg', $loginpress_array ) ? get_option( 'loginpress_customization' )['loginpress_display_bg'] : true;
|
91 |
+
loginpress_bg_option( 'loginpress_display_bg', $loginpress_array );
|
92 |
|
93 |
// ob_start();
|
94 |
?>
|
98 |
}
|
99 |
body.login {
|
100 |
|
101 |
+
<?php if ( ! empty( $loginpress_background_img ) && $loginpress_display_bg ) : ?>
|
102 |
background-image: url(<?php echo $loginpress_background_img; ?>);
|
103 |
+
<?php elseif ( isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
104 |
+
background-image: url();
|
105 |
<?php endif; ?>
|
106 |
<?php if ( ! empty( $loginpress_background_color ) ) : ?>
|
107 |
background-color: <?php echo $loginpress_background_color; ?>;
|
css/style-presets.php
CHANGED
@@ -9,10 +9,10 @@ $selected_preset = 'default1';
|
|
9 |
|
10 |
<?php
|
11 |
if ( $selected_preset == 'default1' ) {
|
12 |
-
include_once LOGINPRESS_ROOT_PATH . '
|
13 |
echo first_presets();
|
14 |
} else if ( $selected_preset == 'default2' ) {
|
15 |
-
include_once LOGINPRESS_ROOT_PATH . '
|
16 |
echo second_presets();
|
17 |
} else {
|
18 |
do_action( 'loginpress_add_pro_theme', $selected_preset );
|
9 |
|
10 |
<?php
|
11 |
if ( $selected_preset == 'default1' ) {
|
12 |
+
include_once LOGINPRESS_ROOT_PATH . 'css/themes/default-1' . EXE;
|
13 |
echo first_presets();
|
14 |
} else if ( $selected_preset == 'default2' ) {
|
15 |
+
include_once LOGINPRESS_ROOT_PATH . 'css/themes/default-2' . EXE;
|
16 |
echo second_presets();
|
17 |
} else {
|
18 |
do_action( 'loginpress_add_pro_theme', $selected_preset );
|
css/themes/default-1.php
CHANGED
@@ -60,7 +60,7 @@ function first_presets() {
|
|
60 |
padding-left: 27px;
|
61 |
font-weight: normal;
|
62 |
}
|
63 |
-
.login
|
64 |
background: #fff;
|
65 |
color: #fff;
|
66 |
margin: 7px 0 7px;
|
60 |
padding-left: 27px;
|
61 |
font-weight: normal;
|
62 |
}
|
63 |
+
.login input[type="submit"] {
|
64 |
background: #fff;
|
65 |
color: #fff;
|
66 |
margin: 7px 0 7px;
|
css/themes/default-2.php
CHANGED
@@ -30,7 +30,6 @@ function second_presets() {
|
|
30 |
display: block;
|
31 |
color: #fff;
|
32 |
font-size: 16px;
|
33 |
-
font-family: 'Open Sans';
|
34 |
width:100%;
|
35 |
border:0;
|
36 |
height: 50px;
|
@@ -44,6 +43,10 @@ function second_presets() {
|
|
44 |
.login form br{
|
45 |
display: none;
|
46 |
}
|
|
|
|
|
|
|
|
|
47 |
#login form p.submit{
|
48 |
clear: both;
|
49 |
padding-top: 35px;
|
@@ -55,7 +58,7 @@ function second_presets() {
|
|
55 |
background-color : #f78f1e;
|
56 |
font-weight: 700;
|
57 |
font-size: 18px;
|
58 |
-
font-family:
|
59 |
color : #ffffff;
|
60 |
height: 56px;
|
61 |
border-radius: 0;
|
@@ -68,7 +71,6 @@ function second_presets() {
|
|
68 |
}
|
69 |
.login form .forgetmenot label{
|
70 |
font-size: 13px;
|
71 |
-
font-family: 'Open Sans';
|
72 |
color: #d5d5d5;
|
73 |
}
|
74 |
.login form input[type=checkbox]{
|
@@ -82,12 +84,10 @@ function second_presets() {
|
|
82 |
margin: 17px 0 0;
|
83 |
padding: 0;
|
84 |
font-size: 14px;
|
85 |
-
font-family: "Open Sans";
|
86 |
color: #d5d5d5;
|
87 |
}
|
88 |
.login #nav a, .login #backtoblog a{
|
89 |
font-size: 14px;
|
90 |
-
font-family: "Open Sans";
|
91 |
color: #d5d5d5;
|
92 |
}
|
93 |
.login #backtoblog{
|
@@ -124,6 +124,16 @@ function second_presets() {
|
|
124 |
input[type=checkbox]:checked:before{
|
125 |
font-size: 18px;
|
126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
</style>
|
128 |
|
129 |
<?php
|
30 |
display: block;
|
31 |
color: #fff;
|
32 |
font-size: 16px;
|
|
|
33 |
width:100%;
|
34 |
border:0;
|
35 |
height: 50px;
|
43 |
.login form br{
|
44 |
display: none;
|
45 |
}
|
46 |
+
#login{
|
47 |
+
width: calc(100% - 30px) !important;
|
48 |
+
max-width: 360px !important;
|
49 |
+
}
|
50 |
#login form p.submit{
|
51 |
clear: both;
|
52 |
padding-top: 35px;
|
58 |
background-color : #f78f1e;
|
59 |
font-weight: 700;
|
60 |
font-size: 18px;
|
61 |
+
font-family: "Roboto", sans-serif;
|
62 |
color : #ffffff;
|
63 |
height: 56px;
|
64 |
border-radius: 0;
|
71 |
}
|
72 |
.login form .forgetmenot label{
|
73 |
font-size: 13px;
|
|
|
74 |
color: #d5d5d5;
|
75 |
}
|
76 |
.login form input[type=checkbox]{
|
84 |
margin: 17px 0 0;
|
85 |
padding: 0;
|
86 |
font-size: 14px;
|
|
|
87 |
color: #d5d5d5;
|
88 |
}
|
89 |
.login #nav a, .login #backtoblog a{
|
90 |
font-size: 14px;
|
|
|
91 |
color: #d5d5d5;
|
92 |
}
|
93 |
.login #backtoblog{
|
124 |
input[type=checkbox]:checked:before{
|
125 |
font-size: 18px;
|
126 |
}
|
127 |
+
@media screen and (max-width: 767px) {
|
128 |
+
.login #nav{
|
129 |
+
text-align: center;
|
130 |
+
width: 100%;
|
131 |
+
}
|
132 |
+
.login #backtoblog{
|
133 |
+
text-align: center;
|
134 |
+
width: 100%;
|
135 |
+
}
|
136 |
+
}
|
137 |
</style>
|
138 |
|
139 |
<?php
|
custom.php
CHANGED
@@ -39,17 +39,25 @@ class LoginPress_Entities {
|
|
39 |
add_action( 'admin_menu', array( $this, 'menu_url' ), 99 );
|
40 |
|
41 |
add_action( 'customize_controls_enqueue_scripts', array( $this, 'loginpress_customizer_js' ) );
|
42 |
-
add_action( 'customize_preview_init', array( $this, 'loginpress_customizer_js' ) );
|
43 |
|
44 |
|
45 |
}
|
46 |
|
47 |
function loginpress_customizer_js() {
|
48 |
wp_enqueue_script('jquery');
|
49 |
-
wp_enqueue_script( '
|
50 |
|
51 |
$admin_url = array( 'template_url' => admin_url() );
|
52 |
-
wp_localize_script( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
|
@@ -62,7 +70,7 @@ class LoginPress_Entities {
|
|
62 |
*/
|
63 |
public function customize_login_panel( $wp_customize ){
|
64 |
|
65 |
-
include
|
66 |
|
67 |
// =============================
|
68 |
// = Panel for the LoginPress =
|
@@ -101,12 +109,13 @@ class LoginPress_Entities {
|
|
101 |
// 'id' => 'default2',
|
102 |
// 'name' => 'Default 2'
|
103 |
// ),
|
104 |
-
//
|
105 |
-
//
|
106 |
-
//
|
107 |
-
//
|
108 |
-
//
|
109 |
-
//
|
|
|
110 |
// );
|
111 |
// $loginpress_templates = apply_filters( 'loginpress_pro_add_template', $loginpress_free_templates );
|
112 |
//
|
@@ -194,28 +203,23 @@ class LoginPress_Entities {
|
|
194 |
'panel' => 'loginpress_panel',
|
195 |
));
|
196 |
|
197 |
-
$wp_customize->add_setting(
|
198 |
-
|
199 |
-
|
200 |
-
// 'default' => plugins_url( 'img/bg.jpg', __FILE__ ) ,
|
201 |
-
'type' => 'option',
|
202 |
'capability' => 'manage_options',
|
203 |
'transport' => 'postMessage'
|
204 |
));
|
205 |
|
206 |
-
$wp_customize->add_control(
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
'
|
212 |
-
|
213 |
-
'priority' => 5,
|
214 |
-
'settings' => 'loginpress_customization[setting_background]',
|
215 |
-
)));
|
216 |
|
217 |
$wp_customize->add_setting( 'loginpress_customization[setting_background_color]', array(
|
218 |
-
'default' => '#ddd5c3',
|
219 |
'type' => 'option',
|
220 |
'capability' => 'manage_options',
|
221 |
'transport' => 'postMessage'
|
@@ -229,10 +233,31 @@ class LoginPress_Entities {
|
|
229 |
array(
|
230 |
'label' => __( 'Background Color:', 'loginpress' ),
|
231 |
'section' => 'section_background',
|
232 |
-
'priority' =>
|
233 |
'settings' => 'loginpress_customization[setting_background_color]'
|
234 |
)));
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
$wp_customize->add_setting( 'loginpress_customization[background_repeat_radio]', array(
|
237 |
'default' => 'no-repeat',
|
238 |
'type' => 'option',
|
@@ -1156,8 +1181,9 @@ class LoginPress_Entities {
|
|
1156 |
public function login_page_custom_head() {
|
1157 |
|
1158 |
// Include CSS File in heared.
|
1159 |
-
|
1160 |
-
include(
|
|
|
1161 |
|
1162 |
|
1163 |
if ( $this->loginpress_key && array_key_exists( 'header_login_menu', $this->loginpress_key ) ) {
|
39 |
add_action( 'admin_menu', array( $this, 'menu_url' ), 99 );
|
40 |
|
41 |
add_action( 'customize_controls_enqueue_scripts', array( $this, 'loginpress_customizer_js' ) );
|
42 |
+
// add_action( 'customize_preview_init', array( $this, 'loginpress_customizer_js' ) );
|
43 |
|
44 |
|
45 |
}
|
46 |
|
47 |
function loginpress_customizer_js() {
|
48 |
wp_enqueue_script('jquery');
|
49 |
+
wp_enqueue_script( 'loginpress-customize-control', plugins_url( 'js/customize-controls.js' , __FILE__ ), array( 'jquery', 'customize-preview' ), LOGINPRESS_VERSION, true );
|
50 |
|
51 |
$admin_url = array( 'template_url' => admin_url() );
|
52 |
+
wp_localize_script( 'loginpress-customize-control', 'admin_url', $admin_url );
|
53 |
+
|
54 |
+
$plugin_url = array( 'plugin_url' => plugins_url() );
|
55 |
+
wp_localize_script( 'loginpress-customize-control', 'plugin_url', $plugin_url );
|
56 |
+
|
57 |
+
|
58 |
+
$login_theme = array( get_option( 'customize_presets_settings', true ) );
|
59 |
+
wp_localize_script( 'loginpress-customize-control', 'login_theme', $login_theme );
|
60 |
+
|
61 |
}
|
62 |
|
63 |
|
70 |
*/
|
71 |
public function customize_login_panel( $wp_customize ){
|
72 |
|
73 |
+
include LOGINPRESS_ROOT_PATH .'classes/control-presets' . EXE;
|
74 |
|
75 |
// =============================
|
76 |
// = Panel for the LoginPress =
|
109 |
// 'id' => 'default2',
|
110 |
// 'name' => 'Default 2'
|
111 |
// ),
|
112 |
+
// 'default3' => array(
|
113 |
+
// 'thumbnail' => plugins_url( 'img/thumbnail/default-3.png', __FILE__ ),
|
114 |
+
// 'id' => 'default3',
|
115 |
+
// 'name' => 'Default 3',
|
116 |
+
// 'pro' => 'yes'
|
117 |
+
// )
|
118 |
+
//
|
119 |
// );
|
120 |
// $loginpress_templates = apply_filters( 'loginpress_pro_add_template', $loginpress_free_templates );
|
121 |
//
|
203 |
'panel' => 'loginpress_panel',
|
204 |
));
|
205 |
|
206 |
+
$wp_customize->add_setting('loginpress_customization[loginpress_display_bg]', array(
|
207 |
+
'default' => true,
|
208 |
+
'type' => 'option',
|
|
|
|
|
209 |
'capability' => 'manage_options',
|
210 |
'transport' => 'postMessage'
|
211 |
));
|
212 |
|
213 |
+
$wp_customize->add_control('loginpress_display_bg', array(
|
214 |
+
'settings' => 'loginpress_customization[loginpress_display_bg]',
|
215 |
+
'label' => __( 'Display Background Image?', 'loginpress'),
|
216 |
+
'section' => 'section_background',
|
217 |
+
'priority' => 5,
|
218 |
+
'type' => 'checkbox',
|
219 |
+
));
|
|
|
|
|
|
|
220 |
|
221 |
$wp_customize->add_setting( 'loginpress_customization[setting_background_color]', array(
|
222 |
+
// 'default' => '#ddd5c3',
|
223 |
'type' => 'option',
|
224 |
'capability' => 'manage_options',
|
225 |
'transport' => 'postMessage'
|
233 |
array(
|
234 |
'label' => __( 'Background Color:', 'loginpress' ),
|
235 |
'section' => 'section_background',
|
236 |
+
'priority' => 10,
|
237 |
'settings' => 'loginpress_customization[setting_background_color]'
|
238 |
)));
|
239 |
|
240 |
+
$wp_customize->add_setting(
|
241 |
+
'loginpress_customization[setting_background]',
|
242 |
+
array(
|
243 |
+
// 'default' => plugins_url( 'img/bg.jpg', __FILE__ ) ,
|
244 |
+
'type' => 'option',
|
245 |
+
'capability' => 'manage_options',
|
246 |
+
'transport' => 'postMessage'
|
247 |
+
));
|
248 |
+
|
249 |
+
$wp_customize->add_control(
|
250 |
+
new WP_Customize_Image_Control(
|
251 |
+
$wp_customize,
|
252 |
+
'setting_background',
|
253 |
+
array(
|
254 |
+
'label' => __( 'Background Image:', 'loginpress' ),
|
255 |
+
'section' => 'section_background',
|
256 |
+
'priority' => 15,
|
257 |
+
'settings' => 'loginpress_customization[setting_background]',
|
258 |
+
)));
|
259 |
+
|
260 |
+
|
261 |
$wp_customize->add_setting( 'loginpress_customization[background_repeat_radio]', array(
|
262 |
'default' => 'no-repeat',
|
263 |
'type' => 'option',
|
1181 |
public function login_page_custom_head() {
|
1182 |
|
1183 |
// Include CSS File in heared.
|
1184 |
+
|
1185 |
+
include( LOGINPRESS_DIR_PATH . 'css/style-presets' . EXE );
|
1186 |
+
include( LOGINPRESS_DIR_PATH . 'css/style-login' . EXE );
|
1187 |
|
1188 |
|
1189 |
if ( $this->loginpress_key && array_key_exists( 'header_login_menu', $this->loginpress_key ) ) {
|
img/thumbnail/default-4.jpg
ADDED
Binary file
|
img/thumbnail/v18.jpg
ADDED
Binary file
|
img/thumbnail/v9.jpg
ADDED
Binary file
|
js/customize-controls.js
CHANGED
@@ -96,6 +96,17 @@ jQuery( document ).ready( function() {
|
|
96 |
} );
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
// function for change LoginPress CSS in real time...
|
101 |
function loginpress_display_control( setting ){
|
@@ -164,6 +175,91 @@ jQuery( document ).ready( function() {
|
|
164 |
} );
|
165 |
}
|
166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
// loginpress_display_control( 'loginpress_customization[footer_display_text]' );
|
168 |
// loginpress_display_control( 'loginpress_customization[back_display_text]' );
|
169 |
|
@@ -186,7 +282,7 @@ jQuery( document ).ready( function() {
|
|
186 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover]', '#login h1 a', 'href' );
|
187 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover_title]', '#login h1 a', 'title' );
|
188 |
|
189 |
-
|
190 |
|
191 |
loginpress_css_property( 'loginpress_customization[setting_background_color]', 'body.login', 'background-color' );
|
192 |
loginpress_css_property( 'loginpress_customization[background_repeat_radio]', 'body.login', 'background-repeat' );
|
@@ -505,5 +601,19 @@ jQuery( document ).ready( function() {
|
|
505 |
|
506 |
loginpress_css_property( 'loginpress_customization[message_background_border]', '.login .custom-message', 'border' );
|
507 |
loginpress_css_property( 'loginpress_customization[message_background_color]', '.login .custom-message', 'background-color' );
|
508 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
} )( jQuery );
|
96 |
} );
|
97 |
}
|
98 |
|
99 |
+
var change_theme;
|
100 |
+
// function for change LoginPress error and welcome messages in real time...
|
101 |
+
|
102 |
+
wp.customize( 'customize_presets_settings', function( value ) {
|
103 |
+
value.bind( function( loginPressVal ) {
|
104 |
+
|
105 |
+
change_theme = loginPressVal;
|
106 |
+
|
107 |
+
} );
|
108 |
+
} );
|
109 |
+
|
110 |
|
111 |
// function for change LoginPress CSS in real time...
|
112 |
function loginpress_display_control( setting ){
|
175 |
} );
|
176 |
}
|
177 |
|
178 |
+
// LoginPress Customizer Background Image Control.
|
179 |
+
function loginpress_customizer_bg( customizer_bg ) {
|
180 |
+
|
181 |
+
if ( 'default1' == customizer_bg ) {
|
182 |
+
loginpress_bg = 'url(' + plugin_url.plugin_url + '/loginpress/img/bg.jpg)';
|
183 |
+
|
184 |
+
} else if ( 'default2' == customizer_bg ) {
|
185 |
+
loginpress_bg = 'url(' + plugin_url.plugin_url + '/loginpress/img/bg2.jpg)';
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
// LoginPress Background Image Control.
|
190 |
+
wp.customize( 'loginpress_customization[loginpress_display_bg]', function( value ) {
|
191 |
+
value.bind( function( loginPressVal ) {
|
192 |
+
customizer_bg = change_theme ? change_theme : login_theme;
|
193 |
+
var bg = $('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image' );
|
194 |
+
|
195 |
+
if( loginPressVal == false ) {
|
196 |
+
|
197 |
+
if ( ! localStorage.loginpress_bg_check ) {
|
198 |
+
|
199 |
+
localStorage.setItem( "loginpress_bg_check", bg );
|
200 |
+
}
|
201 |
+
$('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image', 'none' );
|
202 |
+
$('#customize-control-setting_background').hide();
|
203 |
+
$('#customize-control-background_repeat_radio').hide();
|
204 |
+
$('#customize-control-background_image_size').hide();
|
205 |
+
} else {
|
206 |
+
|
207 |
+
if ( localStorage.getItem("loginpress_bg") === null && localStorage.loginpress_bg_check ) {
|
208 |
+
|
209 |
+
loginpress_bg = localStorage.loginpress_bg_check;
|
210 |
+
console.log('bg1');
|
211 |
+
|
212 |
+
} else if ( localStorage.getItem("loginpress_bg") === null ) {
|
213 |
+
|
214 |
+
loginpress_customizer_bg( customizer_bg );
|
215 |
+
console.log('bg2');
|
216 |
+
} else if ( localStorage.loginpress_bg ) {
|
217 |
+
|
218 |
+
loginpress_bg = 'url(' + localStorage.loginpress_bg + ')';
|
219 |
+
console.log('bg3');
|
220 |
+
} else {
|
221 |
+
|
222 |
+
loginpress_bg = localStorage.loginpress_bg_check;
|
223 |
+
console.log('bg4');
|
224 |
+
}
|
225 |
+
|
226 |
+
$('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image', loginpress_bg );
|
227 |
+
$('#customize-control-setting_background').show();
|
228 |
+
$('#customize-control-background_repeat_radio').show();
|
229 |
+
$('#customize-control-background_image_size').show();
|
230 |
+
}
|
231 |
+
} );
|
232 |
+
} );
|
233 |
+
|
234 |
+
// LoginPress Background instant change.
|
235 |
+
wp.customize( 'loginpress_customization[setting_background]', function( value ) {
|
236 |
+
value.bind( function( loginPressVal ) {
|
237 |
+
customizer_bg = change_theme ? change_theme : login_theme;
|
238 |
+
if( loginPressVal == '' ) {
|
239 |
+
if ( localStorage.loginpress_bg ) {
|
240 |
+
localStorage.removeItem("loginpress_bg");
|
241 |
+
}
|
242 |
+
|
243 |
+
loginpress_customizer_bg( customizer_bg );
|
244 |
+
|
245 |
+
$('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image', loginpress_bg );
|
246 |
+
} else {
|
247 |
+
|
248 |
+
if ( ! localStorage.loginpress_bg ) {
|
249 |
+
localStorage.setItem( "loginpress_bg", loginPressVal );
|
250 |
+
}
|
251 |
+
$('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image', 'url(' + loginPressVal + ')' );
|
252 |
+
}
|
253 |
+
|
254 |
+
} );
|
255 |
+
} );
|
256 |
+
// loginpress_background_img( 'loginpress_customization[]', 'body.login' );
|
257 |
+
$('.customize-controls-close').on('click', function(){
|
258 |
+
localStorage.removeItem("loginpress_bg_check");
|
259 |
+
localStorage.removeItem("loginpress_bg");
|
260 |
+
});
|
261 |
+
localStorage.removeItem("loginpress_bg");
|
262 |
+
localStorage.removeItem("loginpress_bg_check");
|
263 |
// loginpress_display_control( 'loginpress_customization[footer_display_text]' );
|
264 |
// loginpress_display_control( 'loginpress_customization[back_display_text]' );
|
265 |
|
282 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover]', '#login h1 a', 'href' );
|
283 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover_title]', '#login h1 a', 'title' );
|
284 |
|
285 |
+
|
286 |
|
287 |
loginpress_css_property( 'loginpress_customization[setting_background_color]', 'body.login', 'background-color' );
|
288 |
loginpress_css_property( 'loginpress_customization[background_repeat_radio]', 'body.login', 'background-repeat' );
|
601 |
|
602 |
loginpress_css_property( 'loginpress_customization[message_background_border]', '.login .custom-message', 'border' );
|
603 |
loginpress_css_property( 'loginpress_customization[message_background_color]', '.login .custom-message', 'background-color' );
|
604 |
+
// console.log($('#customize-control-loginpress_display_bg').val());
|
605 |
+
|
606 |
+
|
607 |
+
$(window).on('load', function(){
|
608 |
+
console.log($('#customize-control-loginpress_display_bg input[type="checkbox"]').length);
|
609 |
+
if ($('#customize-control-loginpress_display_bg input[type="checkbox"]').is(":checked") ) {
|
610 |
+
$('#customize-control-setting_background').show();
|
611 |
+
$('#customize-control-background_repeat_radio').show();
|
612 |
+
$('#customize-control-background_image_size').show();
|
613 |
+
} else {
|
614 |
+
$('#customize-control-setting_background').hide();
|
615 |
+
$('#customize-control-background_repeat_radio').hide();
|
616 |
+
$('#customize-control-background_image_size').hide();
|
617 |
+
}
|
618 |
+
});
|
619 |
} )( jQuery );
|
loginpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
* Description: LoginPress is the best Login Page Customizer in WordPress which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Requires at least: 4.0
|
@@ -25,7 +25,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
25 |
/**
|
26 |
* @var string
|
27 |
*/
|
28 |
-
public $version = '1.0.
|
29 |
|
30 |
/**
|
31 |
* @var The single instance of the class
|
@@ -64,15 +64,19 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
64 |
private function define_constants() {
|
65 |
|
66 |
$this->define( 'LOGINPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
67 |
-
$this->define( '
|
|
|
68 |
$this->define( 'LOGINPRESS_VERSION', $this->version );
|
|
|
69 |
}
|
70 |
|
71 |
/**
|
72 |
* Include required core files used in admin and on the frontend.
|
73 |
*/
|
|
|
74 |
public function includes() {
|
75 |
-
|
|
|
76 |
}
|
77 |
|
78 |
/**
|
@@ -144,7 +148,15 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
144 |
'manage_options',
|
145 |
"abw",
|
146 |
'__return_null' );
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
|
|
|
|
148 |
public function _row_meta( $links, $file ) {
|
149 |
|
150 |
if ( strpos( $file, 'loginpress.php' ) !== false ) {
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
* Description: LoginPress is the best Login Page Customizer in WordPress which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
+
* Version: 1.0.7
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Requires at least: 4.0
|
25 |
/**
|
26 |
* @var string
|
27 |
*/
|
28 |
+
public $version = '1.0.7';
|
29 |
|
30 |
/**
|
31 |
* @var The single instance of the class
|
64 |
private function define_constants() {
|
65 |
|
66 |
$this->define( 'LOGINPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
67 |
+
$this->define( 'LOGINPRESS_DIR_PATH', plugin_dir_path( __FILE__ ) );
|
68 |
+
$this->define( 'LOGINPRESS_ROOT_PATH', dirname( __FILE__ ) . '/');
|
69 |
$this->define( 'LOGINPRESS_VERSION', $this->version );
|
70 |
+
$this->define( 'EXE', '.php' );
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
* Include required core files used in admin and on the frontend.
|
75 |
*/
|
76 |
+
|
77 |
public function includes() {
|
78 |
+
|
79 |
+
include_once( LOGINPRESS_DIR_PATH . 'custom' . EXE );
|
80 |
}
|
81 |
|
82 |
/**
|
148 |
'manage_options',
|
149 |
"abw",
|
150 |
'__return_null' );
|
151 |
+
|
152 |
+
add_menu_page( __( 'LoginPress', 'loginpress' ),
|
153 |
+
__( 'LoginPress', 'loginpress' ),
|
154 |
+
'manage_options',
|
155 |
+
"abw",
|
156 |
+
'__return_null', '', 50 );
|
157 |
}
|
158 |
+
|
159 |
+
|
160 |
public function _row_meta( $links, $file ) {
|
161 |
|
162 |
if ( strpos( $file, 'loginpress.php' ) !== false ) {
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Login ===
|
2 |
-
Version: 1.0.
|
3 |
Requires at least: 4.0
|
4 |
Tested up to: 4.7.1
|
5 |
Contributors: WPBrigade, hiddenpearls, abdulwahab610
|
6 |
Author URI: https://wpbrigade.com
|
7 |
Tags: customizer, custom login, login logo, login customizer, custom login page, admin, wp-login, customization, forgot password, login error, login page style, loginpress
|
8 |
-
Stable tag: 1.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -13,7 +13,7 @@ LOGIN allows you to easily customize the layout of login, admin login, client lo
|
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
[Login Plugin](http://www.WPBrigade.com/wordpress/plugins/loginpress/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) holds a lot of customization fields to change the layout of the login page of WordPress. You can modify the look and feel of login page completely even the login error messages, forgot error messages, registration error messages and many more.
|
17 |
Login Plugin would give you and your users a feeling that it is a custom login page and a part of the site layout. You must checkout the Demo video of how you can customize WordPress login page.
|
18 |
|
19 |
**Getting Started video for customizing login page using LoginPress**
|
@@ -143,6 +143,9 @@ Please visit <a target="_blank" rel="friend" href="http://www.WPBrigade.com/word
|
|
143 |
|
144 |
== Changelog ==
|
145 |
|
|
|
|
|
|
|
146 |
= 1.0.6 - 2017-01-20 =
|
147 |
* Bug fix: site lock out bug fixed.
|
148 |
|
@@ -168,5 +171,5 @@ Please visit <a target="_blank" rel="friend" href="http://www.WPBrigade.com/word
|
|
168 |
|
169 |
== Upgrade Notice ==
|
170 |
|
171 |
-
= 1.0.
|
172 |
* Bug fix release, please update Immediately.
|
1 |
=== Login ===
|
2 |
+
Version: 1.0.7
|
3 |
Requires at least: 4.0
|
4 |
Tested up to: 4.7.1
|
5 |
Contributors: WPBrigade, hiddenpearls, abdulwahab610
|
6 |
Author URI: https://wpbrigade.com
|
7 |
Tags: customizer, custom login, login logo, login customizer, custom login page, admin, wp-login, customization, forgot password, login error, login page style, loginpress
|
8 |
+
Stable tag: 1.0.7
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
[Login Plugin](http://www.WPBrigade.com/wordpress/plugins/loginpress/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) by LoginPress holds a lot of customization fields to change the layout of the login page of WordPress. You can modify the look and feel of login page completely even the login error messages, forgot error messages, registration error messages and many more.
|
17 |
Login Plugin would give you and your users a feeling that it is a custom login page and a part of the site layout. You must checkout the Demo video of how you can customize WordPress login page.
|
18 |
|
19 |
**Getting Started video for customizing login page using LoginPress**
|
143 |
|
144 |
== Changelog ==
|
145 |
|
146 |
+
= 1.0.7 - 2017-01-24 =
|
147 |
+
* Bug fix: Color and Background management fixed and themes launch.
|
148 |
+
|
149 |
= 1.0.6 - 2017-01-20 =
|
150 |
* Bug fix: site lock out bug fixed.
|
151 |
|
171 |
|
172 |
== Upgrade Notice ==
|
173 |
|
174 |
+
= 1.0.7 =
|
175 |
* Bug fix release, please update Immediately.
|