Version Description
- 2019-06-09 =
- Bugfix: Login error message in Customizer.
- Enhancement: Auto Focus on the LoginPress Panel in Customizer.
- Enhancement: Code refactoring.
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Custom Login Page Customizer | LoginPress |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.25 to 1.2.0
- custom.php +31 -9
- js/customize-controls.js +4 -0
- loginpress.php +2 -2
- readme.txt +10 -5
custom.php
CHANGED
@@ -7,7 +7,7 @@ class LoginPress_Entities {
|
|
7 |
*
|
8 |
* @var string
|
9 |
* @since 1.0.0
|
10 |
-
* @version 1.1.
|
11 |
*/
|
12 |
public $loginpress_key;
|
13 |
|
@@ -25,7 +25,7 @@ class LoginPress_Entities {
|
|
25 |
* Hook into actions and filters
|
26 |
*
|
27 |
* @since 1.0.0
|
28 |
-
* @version 1.1.
|
29 |
*/
|
30 |
private function _hooks() {
|
31 |
|
@@ -43,6 +43,7 @@ class LoginPress_Entities {
|
|
43 |
add_action( 'login_head', array( $this, 'login_page_custom_head' ) );
|
44 |
add_action( 'init', array( $this, 'redirect_to_custom_page' ) );
|
45 |
add_action( 'admin_menu', array( $this, 'menu_url' ), 10 );
|
|
|
46 |
|
47 |
/**
|
48 |
* This function enqueues scripts and styles in the Customizer.
|
@@ -65,9 +66,10 @@ class LoginPress_Entities {
|
|
65 |
* Enqueue jQuery and use wp_localize_script.
|
66 |
*
|
67 |
* @since 1.0.9
|
68 |
-
* @version 1.1.
|
69 |
*/
|
70 |
function loginpress_customizer_js() {
|
|
|
71 |
wp_enqueue_script('jquery');
|
72 |
wp_enqueue_script( 'loginpress-customize-control', plugins_url( 'js/customize-controls.js' , LOGINPRESS_ROOT_FILE ), array( 'jquery', 'customize-preview' ), LOGINPRESS_VERSION, true );
|
73 |
|
@@ -78,13 +80,18 @@ class LoginPress_Entities {
|
|
78 |
*/
|
79 |
wp_enqueue_script( 'loginpress-control-script', plugins_url( 'js/customizer.js' , LOGINPRESS_ROOT_FILE ), array( 'customize-controls' ), LOGINPRESS_VERSION, true );
|
80 |
|
81 |
-
|
82 |
// Get Background URL for use in Customizer JS.
|
83 |
$user = wp_get_current_user();
|
84 |
$name = empty( $user->user_firstname ) ? ucfirst( $user->display_name ) : ucfirst( $user->user_firstname );
|
85 |
$loginpress_bg = get_option( 'loginpress_customization');
|
86 |
$loginpress_bg_url = $loginpress_bg['setting_background'] ? $loginpress_bg['setting_background'] : false;
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
// Array for localize.
|
89 |
$loginpress_localize = array(
|
90 |
'admin_url' => admin_url(),
|
@@ -92,9 +99,10 @@ class LoginPress_Entities {
|
|
92 |
'plugin_url' => plugins_url(),
|
93 |
'login_theme' => get_option( 'customize_presets_settings', true ),
|
94 |
'loginpress_bg_url' => $loginpress_bg_url,
|
95 |
-
'preset_nonce' => wp_create_nonce('loginpress-preset-nonce'),
|
96 |
-
'attachment_nonce' => wp_create_nonce('loginpress-attachment-nonce'),
|
97 |
'preset_loader' => includes_url( 'js/tinymce/skins/lightgray/img/loader.gif' ),
|
|
|
98 |
);
|
99 |
|
100 |
wp_localize_script( 'loginpress-customize-control', 'loginpress_script', $loginpress_localize );
|
@@ -1697,7 +1705,7 @@ class LoginPress_Entities {
|
|
1697 |
* @version 1.0.21
|
1698 |
* @return mixed
|
1699 |
* * * * * * * * * * * * * * * * * * */
|
1700 |
-
public function change_lostpassword_message
|
1701 |
|
1702 |
if ( is_array( $this->loginpress_key ) && array_key_exists( 'login_footer_text', $this->loginpress_key ) && $text == 'Lost your password?' && 'default' == $domain && trim( $this->loginpress_key['login_footer_text'] ) ) {
|
1703 |
|
@@ -1792,7 +1800,7 @@ class LoginPress_Entities {
|
|
1792 |
* @since 1.0.0
|
1793 |
* @return string
|
1794 |
* * * * * * * * * * * * */
|
1795 |
-
public function change_welcome_message
|
1796 |
|
1797 |
if ( $this->loginpress_key ) {
|
1798 |
|
@@ -1882,7 +1890,7 @@ class LoginPress_Entities {
|
|
1882 |
|
1883 |
} else {
|
1884 |
|
1885 |
-
wp_redirect( get_admin_url() . "customize.php?url=" . wp_login_url() );
|
1886 |
}
|
1887 |
}
|
1888 |
}
|
@@ -1924,6 +1932,20 @@ class LoginPress_Entities {
|
|
1924 |
}
|
1925 |
}
|
1926 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1927 |
}
|
1928 |
|
1929 |
?>
|
7 |
*
|
8 |
* @var string
|
9 |
* @since 1.0.0
|
10 |
+
* @version 1.1.26
|
11 |
*/
|
12 |
public $loginpress_key;
|
13 |
|
25 |
* Hook into actions and filters
|
26 |
*
|
27 |
* @since 1.0.0
|
28 |
+
* @version 1.1.26
|
29 |
*/
|
30 |
private function _hooks() {
|
31 |
|
43 |
add_action( 'login_head', array( $this, 'login_page_custom_head' ) );
|
44 |
add_action( 'init', array( $this, 'redirect_to_custom_page' ) );
|
45 |
add_action( 'admin_menu', array( $this, 'menu_url' ), 10 );
|
46 |
+
add_filter( 'wp_login_errors', array( $this, 'remove_error_messages_in_wp_customizer' ), 10, 2 );
|
47 |
|
48 |
/**
|
49 |
* This function enqueues scripts and styles in the Customizer.
|
66 |
* Enqueue jQuery and use wp_localize_script.
|
67 |
*
|
68 |
* @since 1.0.9
|
69 |
+
* @version 1.1.26
|
70 |
*/
|
71 |
function loginpress_customizer_js() {
|
72 |
+
|
73 |
wp_enqueue_script('jquery');
|
74 |
wp_enqueue_script( 'loginpress-customize-control', plugins_url( 'js/customize-controls.js' , LOGINPRESS_ROOT_FILE ), array( 'jquery', 'customize-preview' ), LOGINPRESS_VERSION, true );
|
75 |
|
80 |
*/
|
81 |
wp_enqueue_script( 'loginpress-control-script', plugins_url( 'js/customizer.js' , LOGINPRESS_ROOT_FILE ), array( 'customize-controls' ), LOGINPRESS_VERSION, true );
|
82 |
|
|
|
83 |
// Get Background URL for use in Customizer JS.
|
84 |
$user = wp_get_current_user();
|
85 |
$name = empty( $user->user_firstname ) ? ucfirst( $user->display_name ) : ucfirst( $user->user_firstname );
|
86 |
$loginpress_bg = get_option( 'loginpress_customization');
|
87 |
$loginpress_bg_url = $loginpress_bg['setting_background'] ? $loginpress_bg['setting_background'] : false;
|
88 |
|
89 |
+
if( $_GET['autofocus'] == 'loginpress_panel' ) { // 1.1.26
|
90 |
+
$loginpress_auto_focus = true;
|
91 |
+
} else {
|
92 |
+
$loginpress_auto_focus = false;
|
93 |
+
}
|
94 |
+
|
95 |
// Array for localize.
|
96 |
$loginpress_localize = array(
|
97 |
'admin_url' => admin_url(),
|
99 |
'plugin_url' => plugins_url(),
|
100 |
'login_theme' => get_option( 'customize_presets_settings', true ),
|
101 |
'loginpress_bg_url' => $loginpress_bg_url,
|
102 |
+
'preset_nonce' => wp_create_nonce( 'loginpress-preset-nonce' ),
|
103 |
+
'attachment_nonce' => wp_create_nonce( 'loginpress-attachment-nonce' ),
|
104 |
'preset_loader' => includes_url( 'js/tinymce/skins/lightgray/img/loader.gif' ),
|
105 |
+
'autoFocusPanel' => $loginpress_auto_focus,
|
106 |
);
|
107 |
|
108 |
wp_localize_script( 'loginpress-customize-control', 'loginpress_script', $loginpress_localize );
|
1705 |
* @version 1.0.21
|
1706 |
* @return mixed
|
1707 |
* * * * * * * * * * * * * * * * * * */
|
1708 |
+
public function change_lostpassword_message( $translated_text, $text, $domain ) {
|
1709 |
|
1710 |
if ( is_array( $this->loginpress_key ) && array_key_exists( 'login_footer_text', $this->loginpress_key ) && $text == 'Lost your password?' && 'default' == $domain && trim( $this->loginpress_key['login_footer_text'] ) ) {
|
1711 |
|
1800 |
* @since 1.0.0
|
1801 |
* @return string
|
1802 |
* * * * * * * * * * * * */
|
1803 |
+
public function change_welcome_message($message) {
|
1804 |
|
1805 |
if ( $this->loginpress_key ) {
|
1806 |
|
1890 |
|
1891 |
} else {
|
1892 |
|
1893 |
+
wp_redirect( get_admin_url() . "customize.php?url=" . wp_login_url() . '&autofocus=loginpress_panel' );
|
1894 |
}
|
1895 |
}
|
1896 |
}
|
1932 |
}
|
1933 |
}
|
1934 |
}
|
1935 |
+
|
1936 |
+
/**
|
1937 |
+
* This function is removed the error messages in the customizer.
|
1938 |
+
* @param array $errors [description]
|
1939 |
+
* @param string $redirect_to [description]
|
1940 |
+
* @since 1.1.26
|
1941 |
+
*/
|
1942 |
+
function remove_error_messages_in_wp_customizer( $errors, $redirect_to ) {
|
1943 |
+
|
1944 |
+
if ( is_customize_preview() && version_compare( $GLOBALS['wp_version'], '5.2', '>=' ) ) {
|
1945 |
+
return new WP_Error( '', '' );
|
1946 |
+
}
|
1947 |
+
return $errors;
|
1948 |
+
}
|
1949 |
}
|
1950 |
|
1951 |
?>
|
js/customize-controls.js
CHANGED
@@ -1473,6 +1473,10 @@ jQuery(document).ready(function($) {
|
|
1473 |
$("<style type='text/css' id='loginpress-scbg-size'></style>").appendTo(loginpress_find('head'));
|
1474 |
$("<style type='text/css' id='loginpress-scbg-repeat'></style>").appendTo(loginpress_find('head'));
|
1475 |
|
|
|
|
|
|
|
|
|
1476 |
});
|
1477 |
|
1478 |
})(jQuery);
|
1473 |
$("<style type='text/css' id='loginpress-scbg-size'></style>").appendTo(loginpress_find('head'));
|
1474 |
$("<style type='text/css' id='loginpress-scbg-repeat'></style>").appendTo(loginpress_find('head'));
|
1475 |
|
1476 |
+
if ( loginpress_script.autoFocusPanel ) { // Auto Focus on LoginPress Panel // 1.1.26
|
1477 |
+
wp.customize.panel("loginpress_panel").focus();
|
1478 |
+
}
|
1479 |
+
|
1480 |
});
|
1481 |
|
1482 |
})(jQuery);
|
loginpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: https://WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
* Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
-
* Version: 1.
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: https://WPBrigade.com/
|
9 |
* Text Domain: loginpress
|
@@ -22,7 +22,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
-
public $version = '1.
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: https://WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
* Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
+
* Version: 1.2.0
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: https://WPBrigade.com/
|
9 |
* Text Domain: loginpress
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
+
public $version = '1.2.0';
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Requires at least: 4.0
|
|
3 |
Tested up to: 5.2
|
4 |
Contributors: WPBrigade, hiddenpearls, AbdulWahab610
|
5 |
Author URI: https://wpbrigade.com
|
6 |
-
Tags: wp-login, login, login customizer, custom login, wordpress login,
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -35,7 +35,7 @@ LoginPress plugin is built using The Customizer API which is getting popular for
|
|
35 |
|
36 |
We have a collection of great Free and Pro addons that makes LoginPress more powerfull. Upgrade to Pro package and enjoy the show.
|
37 |
|
38 |
-
* Login Logout Menu (FREE)
|
39 |
* Social Login
|
40 |
* Login Widget
|
41 |
* Login Redirects
|
@@ -214,6 +214,11 @@ Please visit <a target="_blank" rel="friend" href="https://WPBrigade.com/wordpre
|
|
214 |
|
215 |
== Changelog ==
|
216 |
|
|
|
|
|
|
|
|
|
|
|
217 |
= 1.1.25 - 2019-05-25 =
|
218 |
* Bugfix: Compatible Network sites with WordPress 5.2.
|
219 |
* Enhancement: Code refactoring.
|
@@ -485,5 +490,5 @@ Please visit <a target="_blank" rel="friend" href="https://WPBrigade.com/wordpre
|
|
485 |
|
486 |
== Upgrade Notice ==
|
487 |
|
488 |
-
= 1.
|
489 |
-
* Important Release, upgrade immediately
|
3 |
Tested up to: 5.2
|
4 |
Contributors: WPBrigade, hiddenpearls, AbdulWahab610
|
5 |
Author URI: https://wpbrigade.com
|
6 |
+
Tags: wp-login, login, login customizer, custom login, wordpress login, login customizer, custom login page, login error, login page style, loginpress
|
7 |
+
Stable tag: 1.2.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
35 |
|
36 |
We have a collection of great Free and Pro addons that makes LoginPress more powerfull. Upgrade to Pro package and enjoy the show.
|
37 |
|
38 |
+
* [Login Logout Menu (FREE)](https://wordpress.org/plugins/login-logout-menu/)
|
39 |
* Social Login
|
40 |
* Login Widget
|
41 |
* Login Redirects
|
214 |
|
215 |
== Changelog ==
|
216 |
|
217 |
+
= 1.2.0 - 2019-06-09 =
|
218 |
+
* Bugfix: Login error message in Customizer.
|
219 |
+
* Enhancement: Auto Focus on the LoginPress Panel in Customizer.
|
220 |
+
* Enhancement: Code refactoring.
|
221 |
+
|
222 |
= 1.1.25 - 2019-05-25 =
|
223 |
* Bugfix: Compatible Network sites with WordPress 5.2.
|
224 |
* Enhancement: Code refactoring.
|
490 |
|
491 |
== Upgrade Notice ==
|
492 |
|
493 |
+
= 1.2.0=
|
494 |
+
* Important Release, upgrade immediately.
|