Custom Login Page Customizer | LoginPress - Version 1.4.6

Version Description

2020-08-12 = * New Feature: Created a new control for change wp-login.php page title. * Bugfix: Button text size control in customizer. * Compatibility: Compatible with WordPress 5.5.

Download this release

Release Info

Developer hiddenpearls
Plugin Icon 128x128 Custom Login Page Customizer | LoginPress
Version 1.4.6
Comparing to
See all releases

Code changes from version 1.4.5 to 1.4.6

Files changed (4) hide show
  1. custom.php +28 -10
  2. js/customize-controls.js +26 -1
  3. loginpress.php +2 -2
  4. readme.txt +8 -3
custom.php CHANGED
@@ -29,6 +29,7 @@ class LoginPress_Entities {
29
  */
30
  private function _hooks() {
31
 
 
32
  add_filter( 'login_headerurl', array( $this, 'login_page_logo_url' ) );
33
  if ( version_compare( $GLOBALS['wp_version'], '5.2', '<' ) ) {
34
  add_filter( 'login_headertitle',array( $this, 'login_page_logo_title' ) );
@@ -409,18 +410,19 @@ class LoginPress_Entities {
409
  $this->loginpress_rangle_seting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 1, 15 );
410
  $this->loginpress_rangle_seting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 2, 20 );
411
 
412
- if ( version_compare( $GLOBALS['wp_version'], '5.2', '<' )) {
413
  $loginpress_logo_title = __( 'Logo Hover Title:', 'loginpress' );
414
  } else {
415
  $loginpress_logo_title = __( 'Logo Title:', 'loginpress' );
416
  }
417
- $logo_control = array( 'customize_logo_hover', 'customize_logo_hover_title' );
418
- $logo_default = array( '', '' );
419
- $logo_label = array( __( 'Logo URL:', 'loginpress' ), $loginpress_logo_title );
420
- $logo_sanitization = array( 'esc_url_raw', 'wp_strip_all_tags' );
 
421
 
422
  $logo = 0;
423
- while ( $logo < 2 ) :
424
 
425
  $wp_customize->add_setting( "loginpress_customization[{$logo_control[$logo]}]", array(
426
  'default' => $logo_default[$logo],
@@ -431,10 +433,11 @@ class LoginPress_Entities {
431
  ) );
432
 
433
  $wp_customize->add_control( "loginpress_customization[{$logo_control[$logo]}]", array(
434
- 'label' => $logo_label[$logo],
435
- 'section' => 'customize_logo_section',
436
- 'priority' => 25,
437
- 'settings' => "loginpress_customization[{$logo_control[$logo]}]"
 
438
  ) );
439
 
440
  $logo++;
@@ -1875,6 +1878,21 @@ class LoginPress_Entities {
1875
  }
1876
  }
1877
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1878
  /**
1879
  * Hook to Redirect Page for Customize
1880
  *
29
  */
30
  private function _hooks() {
31
 
32
+ add_filter( 'login_title', array( $this, 'login_page_title' ), 99);
33
  add_filter( 'login_headerurl', array( $this, 'login_page_logo_url' ) );
34
  if ( version_compare( $GLOBALS['wp_version'], '5.2', '<' ) ) {
35
  add_filter( 'login_headertitle',array( $this, 'login_page_logo_title' ) );
410
  $this->loginpress_rangle_seting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 1, 15 );
411
  $this->loginpress_rangle_seting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 2, 20 );
412
 
413
+ if ( version_compare( $GLOBALS['wp_version'], '5.2', '<' ) ) {
414
  $loginpress_logo_title = __( 'Logo Hover Title:', 'loginpress' );
415
  } else {
416
  $loginpress_logo_title = __( 'Logo Title:', 'loginpress' );
417
  }
418
+ $logo_control = array( 'customize_logo_hover', 'customize_logo_hover_title', 'customize_login_page_title' );
419
+ $logo_default = array( '', '', '' );
420
+ $logo_label = array( __( 'Logo URL:', 'loginpress' ), $loginpress_logo_title, __( 'Login Page Title:', 'loginpress' ) );
421
+ $logo_sanitization = array( 'esc_url_raw', 'wp_strip_all_tags', 'wp_strip_all_tags' );
422
+ $logo_desc = array( '', '', __( 'Login page title that is shown on WordPress login page.', 'loginpress' ) );
423
 
424
  $logo = 0;
425
+ while ( $logo < 3 ) :
426
 
427
  $wp_customize->add_setting( "loginpress_customization[{$logo_control[$logo]}]", array(
428
  'default' => $logo_default[$logo],
433
  ) );
434
 
435
  $wp_customize->add_control( "loginpress_customization[{$logo_control[$logo]}]", array(
436
+ 'label' => $logo_label[$logo],
437
+ 'section' => 'customize_logo_section',
438
+ 'priority' => 25,
439
+ 'settings' => "loginpress_customization[{$logo_control[$logo]}]",
440
+ 'description' => $logo_desc[$logo]
441
  ) );
442
 
443
  $logo++;
1878
  }
1879
  }
1880
 
1881
+ /**
1882
+ * Set WordPress login page title.
1883
+ *
1884
+ * @since 1.4.6
1885
+ * @return string
1886
+ * * * * * * * * * * * * * * * * */
1887
+ public function login_page_title( $title ) {
1888
+
1889
+ if ( $this->loginpress_key && array_key_exists( 'customize_login_page_title', $this->loginpress_key ) && ! empty( $this->loginpress_key['customize_login_page_title'] ) ) {
1890
+ return $this->loginpress_key["customize_login_page_title"];
1891
+ } else {
1892
+ return $title;
1893
+ }
1894
+ }
1895
+
1896
  /**
1897
  * Hook to Redirect Page for Customize
1898
  *
js/customize-controls.js CHANGED
@@ -1320,7 +1320,32 @@ jQuery(document).ready(function($) {
1320
  loginpress_new_css_property( 'loginpress_customization[login_button_radius]', '.login input[type="submit"]', 'border-radius', 'px' );
1321
  loginpress_shadow_property( 'loginpress_customization[login_button_shadow]', '.login input[type="submit"]', 'box-shadow', 'px' );
1322
  loginpress_shadow_opacity_property( 'loginpress_customization[login_button_shadow_opacity]', '.login input[type="submit"]', 'box-shadow', 'px' );
1323
- loginpress_new_css_property( 'loginpress_customization[login_button_text_size]', '.login input[type="submit"]', 'font-size', 'px' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1324
 
1325
  /**
1326
  * Change LoginPress 'Back to Blog(link)' hover color live.
1320
  loginpress_new_css_property( 'loginpress_customization[login_button_radius]', '.login input[type="submit"]', 'border-radius', 'px' );
1321
  loginpress_shadow_property( 'loginpress_customization[login_button_shadow]', '.login input[type="submit"]', 'box-shadow', 'px' );
1322
  loginpress_shadow_opacity_property( 'loginpress_customization[login_button_shadow_opacity]', '.login input[type="submit"]', 'box-shadow', 'px' );
1323
+ loginpress_css_property_imp( 'loginpress_customization[login_button_text_size]', '.login input[type="submit"]', 'font-size', 'px' );
1324
+
1325
+ /**
1326
+ * function for change LoginPress CSS in real time with !important...
1327
+ * @param string setting [Name of the setting]
1328
+ * @param string target [Targeted CSS class/ID]
1329
+ * @param string property [CSS property]
1330
+ * @param string suffix [unit value]
1331
+ *
1332
+ * @return string [CSS property in real time]
1333
+ * @since 1.4.6
1334
+ */
1335
+ function loginpress_css_property_imp( setting, target, property, suffix ) {
1336
+ // Update the login logo width in real time...
1337
+ wp.customize( setting, function( value ) {
1338
+ value.bind( function( loginPressVal ) {
1339
+ console.log(loginPressVal);
1340
+
1341
+ if ( loginPressVal == '' ) {
1342
+ loginpress_find( target ).css( property, '' );
1343
+ } else {
1344
+ loginpress_find( target ).attr( 'style', property + ': ' + loginPressVal + suffix + ' !important' );
1345
+ }
1346
+ } );
1347
+ } );
1348
+ }
1349
 
1350
  /**
1351
  * Change LoginPress 'Back to Blog(link)' hover color live.
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.4.5
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.4.5';
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.4.6
7
  * Author: WPBrigade
8
  * Author URI: https://WPBrigade.com/
9
  * Text Domain: loginpress
22
  /**
23
  * @var string
24
  */
25
+ public $version = '1.4.6';
26
 
27
  /**
28
  * @var The single instance of the class
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Custom Login Page Customizer | LoginPress ===
2
  Requires at least: 4.0
3
- Tested up to: 5.4
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.4.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -216,6 +216,11 @@ Please visit <a target="_blank" rel="friend" href="https://WPBrigade.com/wordpre
216
  23. Custom Login page (Company theme) Example #23 with Captcha [Pro feature](https://WPBrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=screenshots&utm_campaign=pro-upgrade)
217
 
218
  == Changelog ==
 
 
 
 
 
219
  = 1.4.5 – 2020-07-16 =
220
  * Bugfix: Truncate a filter `loginpress_prevent_new_user_notification_email`.
221
 
@@ -566,5 +571,5 @@ Please visit <a target="_blank" rel="friend" href="https://WPBrigade.com/wordpre
566
 
567
  == Upgrade Notice ==
568
 
569
- = 1.4.5 =
570
  * Important Release, upgrade immediately.
1
  === Custom Login Page Customizer | LoginPress ===
2
  Requires at least: 4.0
3
+ Tested up to: 5.5
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.4.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
216
  23. Custom Login page (Company theme) Example #23 with Captcha [Pro feature](https://WPBrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=screenshots&utm_campaign=pro-upgrade)
217
 
218
  == Changelog ==
219
+ = 1.4.6 – 2020-08-12 =
220
+ * New Feature: Created a new control for change wp-login.php page title.
221
+ * Bugfix: Button text size control in customizer.
222
+ * Compatibility: Compatible with WordPress 5.5.
223
+
224
  = 1.4.5 – 2020-07-16 =
225
  * Bugfix: Truncate a filter `loginpress_prevent_new_user_notification_email`.
226
 
571
 
572
  == Upgrade Notice ==
573
 
574
+ = 1.4.6 =
575
  * Important Release, upgrade immediately.