Skip to content

Commit

Permalink
Merge branch 'release/4.3.0'
Browse files Browse the repository at this point in the history
* release/4.3.0:
  Bump tested up to, and requires at least.
  Version 4.3.0
  Update login css target for WordPress >= 6.7. (#117)
  • Loading branch information
thefrosty committed Oct 30, 2024
2 parents 53a3390 + a8a786c commit 7e83680
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 20 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
**Donate link:** [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7431290)
**Tags:** admin, branding, customization, custom login, logo
**Requires at least:** 6.2
**Tested up to:** 6.6.2
**Tested up to:** 6.7.0
**Requires PHP**: 8.0
**Stable tag:** 4.2.0
**Stable tag:** 4.3.0
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -168,6 +168,11 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi

## Changelog ##

### Version 4.3.0 (2024/10/30) ###

* Bump Tested up to too "6.7.0"
* Updated login logo HTML attribute for CSS targeting in WP 6.7.

### Version 4.2.0 (2024/04/25) ###

* Bump Tested up to too "6.5.2"
Expand Down
6 changes: 3 additions & 3 deletions custom-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* Plugin Name: Custom Login
* Plugin URI: https://frosty.media/plugins/custom-login
* Description: A simple way to customize your WordPress <code>wp-login.php</code> screen! A <a href="https://frosty.media/">Frosty Media</a> plugin.
* Version: 4.2.0
* Version: 4.3.0
* Author: Austin Passy
* Author URI: https://austin.passy.co
* Requires at least: 6.2
* Tested up to: 6.5.2
* Requires at least: 6.3
* Tested up to: 6.7.0
* Requires PHP: 8.0
* Text Domain: custom-login
* GitHub Plugin URI: https://github.com/thefrosty/custom-login
Expand Down
2 changes: 1 addition & 1 deletion phpcs-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<arg name="tab-width" value="4"/>
<!-- For CI, don't fail on warnings -->
<config name="ignore_warnings_on_exit" value="1"/>
<config name="minimum_supported_wp_version" value="6.2" />
<config name="minimum_supported_wp_version" value="6.3" />

<rule ref="PSR12">
<exclude name="PSR12.Classes.OpeningBraceSpace.Found"/>
Expand Down
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Contributors: austyfrosty, frostymedia
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7431290
Tags: admin, branding, customization, custom login, logo
Requires at least: 6.2
Tested up to: 6.6.2
Requires at least: 6.3
Tested up to: 6.7.0
Requires PHP: 8.0
Stable tag: 4.2.0
Stable tag: 4.3.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -117,6 +117,11 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi

== Changelog ==

= Version 4.2.0 (2024/10/30) =

* Bump Tested up to too "6.7.0"
* Updated login logo HTML attribute for CSS targeting in WP 6.7.

= Version 4.2.0 (2024/04/25) =

* Bump Tested up to too "6.5.2"
Expand Down
17 changes: 7 additions & 10 deletions resources/views/wp-login/style.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
exit;
}

if (!defined('SHORTINIT')) {
define('SHORTINIT', true);
}

$login_h1 = version_compare($GLOBALS['wp_version'], '6.7', '>=') ? '.login .wp-login-logo' : '.login h1';
$version ??= CustomLogin::VERSION;
$close_rule = "}\n";

Expand Down Expand Up @@ -136,20 +133,20 @@

/**
* Open login h1
* @rule .login h1
* @rule .login h1 / .login .wp-login-logo
*/
if ((!empty($logo_force_form_max_width) && $logo_force_form_max_width === OptionValue::ON) && !empty($login_form_width)) {
$css .= openCssRule('.login h1');
$css .= openCssRule($login_h1);
$css .= trailingSemicolonIt('width', sprintf('%1$s%2$s', $login_form_width, $login_form_width_unit ?? 'px'));
$css .= $close_rule; // CLOSE .login
$css .= $close_rule; // CLOSE .login h1 / .login .wp-login-logo
}

/**
* Open login h1 a
* @rule .login h1 a
* @rule .login h1 a / .login .wp-login-logo a
*/
if (!empty($logo_background_url)) {
$css .= openCssRule('.login h1 a');
$css .= openCssRule("$login_h1 a");
if (!empty($logo_background_size_width)) {
$css .= trailingSemicolonIt('width', sprintf('%1$spx !important', $logo_background_size_width));
}
Expand All @@ -167,7 +164,7 @@
} else {
$css .= prefixIt('background-size', 'inherit');
}
$css .= $close_rule; // CLOSE .login h1 a
$css .= $close_rule; // CLOSE .login h1 a / .login .wp-login-logo a
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/CustomLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CustomLogin extends AbstractHookProvider

public const API_URL = 'https://frosty.media/';
public const OPTION = 'custom_login';
public const VERSION = '4.2.0';
public const VERSION = '4.3.0';

/**
* Get the API URL.
Expand Down

0 comments on commit 7e83680

Please sign in to comment.