Version Description
2022-06-24 = * BugFix: Import/Export issue with PHP 8.1 * Enhancement: Added WebP support for logo and background image. * Compatibility: Compatible with WordPress 6.0
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Custom Login Page Customizer | LoginPress |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- classes/class-loginpress-ajax.php +7 -7
- include/customizer-validation.php +30 -14
- loginpress.php +2 -2
- readme.txt +9 -4
classes/class-loginpress-ajax.php
CHANGED
@@ -21,9 +21,9 @@ if ( ! class_exists( 'LoginPress_AJAX' ) ) :
|
|
21 |
* * * * * * * * * */
|
22 |
public function __construct() {
|
23 |
|
24 |
-
$this
|
25 |
}
|
26 |
-
public
|
27 |
|
28 |
$ajax_calls = array(
|
29 |
'export' => false,
|
@@ -32,17 +32,17 @@ if ( ! class_exists( 'LoginPress_AJAX' ) ) :
|
|
32 |
'deactivate' => false,
|
33 |
'optout_yes' => false,
|
34 |
'presets' => false,
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
);
|
39 |
|
40 |
foreach ( $ajax_calls as $ajax_call => $no_priv ) {
|
41 |
// code...
|
42 |
-
add_action( 'wp_ajax_loginpress_' . $ajax_call, array(
|
43 |
|
44 |
if ( $no_priv ) {
|
45 |
-
add_action( 'wp_ajax_nopriv_loginpress_' . $ajax_call, array(
|
46 |
}
|
47 |
}
|
48 |
}
|
21 |
* * * * * * * * * */
|
22 |
public function __construct() {
|
23 |
|
24 |
+
$this->init();
|
25 |
}
|
26 |
+
public function init() {
|
27 |
|
28 |
$ajax_calls = array(
|
29 |
'export' => false,
|
32 |
'deactivate' => false,
|
33 |
'optout_yes' => false,
|
34 |
'presets' => false,
|
35 |
+
'video_url' => false,
|
36 |
+
'activate_addon' => false,
|
37 |
+
'deactivate_addon' => false
|
38 |
);
|
39 |
|
40 |
foreach ( $ajax_calls as $ajax_call => $no_priv ) {
|
41 |
// code...
|
42 |
+
add_action( 'wp_ajax_loginpress_' . $ajax_call, array( $this, $ajax_call ) );
|
43 |
|
44 |
if ( $no_priv ) {
|
45 |
+
add_action( 'wp_ajax_nopriv_loginpress_' . $ajax_call, array( $this, $ajax_call ) );
|
46 |
}
|
47 |
}
|
48 |
}
|
include/customizer-validation.php
CHANGED
@@ -4,6 +4,8 @@
|
|
4 |
*
|
5 |
* This file demonstrates how to define sanitization callback functions for various data types.
|
6 |
* @since 1.1.16
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
/**
|
@@ -62,35 +64,49 @@ function loginpress_sanitize_select( $input, $setting ) {
|
|
62 |
* @param string $image Image filename.
|
63 |
* @param WP_Customize_Setting $setting Setting instance.
|
64 |
* @return string The image filename if the extension is allowed; otherwise, the setting default.
|
65 |
-
*
|
|
|
|
|
|
|
66 |
*/
|
67 |
function loginpress_sanitize_image( $image, $setting ) {
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
$mimes = array(
|
75 |
'jpg|jpeg|jpe' => 'image/jpeg',
|
76 |
'gif' => 'image/gif',
|
77 |
'png' => 'image/png',
|
78 |
'bmp' => 'image/bmp',
|
79 |
'tif|tiff' => 'image/tiff',
|
80 |
-
'ico' => 'image/x-icon'
|
81 |
);
|
82 |
|
83 |
-
// Allowed svg mime type in version 1.2.2
|
84 |
$allowed_mime = get_allowed_mime_types();
|
85 |
-
$svg_mime_check = isset( $allowed_mime['svg'] ) ? true : false;
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
-
|
93 |
$file = wp_check_filetype( $image, $mimes );
|
94 |
-
|
95 |
return ( $file['ext'] ? $image : $setting->default );
|
96 |
}
|
4 |
*
|
5 |
* This file demonstrates how to define sanitization callback functions for various data types.
|
6 |
* @since 1.1.16
|
7 |
+
*
|
8 |
+
* @version 1.6.1
|
9 |
*/
|
10 |
|
11 |
/**
|
64 |
* @param string $image Image filename.
|
65 |
* @param WP_Customize_Setting $setting Setting instance.
|
66 |
* @return string The image filename if the extension is allowed; otherwise, the setting default.
|
67 |
+
*
|
68 |
+
* @since 1.1.17
|
69 |
+
*
|
70 |
+
* @version 1.6.1
|
71 |
*/
|
72 |
function loginpress_sanitize_image( $image, $setting ) {
|
73 |
|
74 |
+
/*
|
75 |
+
* Array of valid image file types.
|
76 |
+
*
|
77 |
+
* The array includes image mime types that are included in wp_get_mime_types()
|
78 |
+
*/
|
79 |
$mimes = array(
|
80 |
'jpg|jpeg|jpe' => 'image/jpeg',
|
81 |
'gif' => 'image/gif',
|
82 |
'png' => 'image/png',
|
83 |
'bmp' => 'image/bmp',
|
84 |
'tif|tiff' => 'image/tiff',
|
85 |
+
'ico' => 'image/x-icon',
|
86 |
);
|
87 |
|
|
|
88 |
$allowed_mime = get_allowed_mime_types();
|
|
|
89 |
|
90 |
+
/**
|
91 |
+
* Filter the list of mime types that are allowed for uploads.
|
92 |
+
*
|
93 |
+
* @since 1.6.1
|
94 |
+
*/
|
95 |
+
$extra_mimes = array(
|
96 |
+
'svg' => 'image/svg+xml', // Allowed svg mime type in version 1.2.2
|
97 |
+
'webp' => 'image/webp', // Allowed webp mime type in version 1.6.1
|
98 |
+
);
|
99 |
+
|
100 |
+
foreach ( $extra_mimes as $key => $value ) {
|
101 |
+
$mime_check = isset( $allowed_mime[ $key ] ) ? true : false;
|
102 |
+
if ( $mime_check ) {
|
103 |
+
$allow_mime = array( $key => $value );
|
104 |
+
$mimes = array_merge( $mimes, $allow_mime );
|
105 |
+
}
|
106 |
}
|
107 |
|
108 |
+
// Return an array with file extension and mime_type.
|
109 |
$file = wp_check_filetype( $image, $mimes );
|
110 |
+
// If $image has a valid mime_type, return it; otherwise, return the default.
|
111 |
return ( $file['ext'] ? $image : $setting->default );
|
112 |
}
|
loginpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login Screen.
|
4 |
* Plugin URI: https://loginpress.pro/?utm_source=loginpress-lite&utm_medium=plugin-inside&utm_campaign=pro-upgrade&utm_content=plugin_uri
|
5 |
* Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/?utm_source=loginpress-lite">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
-
* Version: 1.6.
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: https://WPBrigade.com/?utm_source=loginpress-lite
|
9 |
* Text Domain: loginpress
|
@@ -22,7 +22,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
-
public $version = '1.6.
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login Screen.
|
4 |
* Plugin URI: https://loginpress.pro/?utm_source=loginpress-lite&utm_medium=plugin-inside&utm_campaign=pro-upgrade&utm_content=plugin_uri
|
5 |
* Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/?utm_source=loginpress-lite">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
+
* Version: 1.6.1
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: https://WPBrigade.com/?utm_source=loginpress-lite
|
9 |
* Text Domain: loginpress
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
+
public $version = '1.6.1';
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== LoginPress | Custom Login Page Customizer ===
|
2 |
Requires at least: 4.0
|
3 |
-
Tested up to:
|
4 |
Contributors: WPBrigade, hiddenpearls, AbdulWahab610
|
5 |
Author URI: https://wpbrigade.com/?utm_source=loginpress-lite&utm_medium=author-url-link
|
6 |
Tags: wp-login, login, login customizer, custom login, wordpress login,
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -221,6 +221,11 @@ Please visit <a target="_blank" rel="friend" href="https://loginpress.pro?utm_so
|
|
221 |
|
222 |
== Changelog ==
|
223 |
|
|
|
|
|
|
|
|
|
|
|
224 |
= 1.6.0 – 2022-03-16 =
|
225 |
* New Feature: Created a new control for customizing the font size of the login form labels.
|
226 |
* Enhancement: For multisite, excluded the LoginPress page from YOAST SEO sitemap.
|
@@ -651,5 +656,5 @@ Please visit <a target="_blank" rel="friend" href="https://loginpress.pro?utm_so
|
|
651 |
|
652 |
== Upgrade Notice ==
|
653 |
|
654 |
-
= 1.6.
|
655 |
-
* Important Release, upgrade immediately. Compatible with
|
1 |
=== LoginPress | Custom Login Page Customizer ===
|
2 |
Requires at least: 4.0
|
3 |
+
Tested up to: 6.0
|
4 |
Contributors: WPBrigade, hiddenpearls, AbdulWahab610
|
5 |
Author URI: https://wpbrigade.com/?utm_source=loginpress-lite&utm_medium=author-url-link
|
6 |
Tags: wp-login, login, login customizer, custom login, wordpress login,
|
7 |
+
Stable tag: 1.6.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
221 |
|
222 |
== Changelog ==
|
223 |
|
224 |
+
= 1.6.1 – 2022-06-24 =
|
225 |
+
* BugFix: Import/Export issue with PHP 8.1
|
226 |
+
* Enhancement: Added WebP support for logo and background image.
|
227 |
+
* Compatibility: Compatible with WordPress 6.0
|
228 |
+
|
229 |
= 1.6.0 – 2022-03-16 =
|
230 |
* New Feature: Created a new control for customizing the font size of the login form labels.
|
231 |
* Enhancement: For multisite, excluded the LoginPress page from YOAST SEO sitemap.
|
656 |
|
657 |
== Upgrade Notice ==
|
658 |
|
659 |
+
= 1.6.1 =
|
660 |
+
* Important Release, upgrade immediately. Compatible with 6.0
|