diff --git a/README.md b/README.md index 15edacf..62ef37e 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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" diff --git a/custom-login.php b/custom-login.php index fab1154..4b56fd5 100755 --- a/custom-login.php +++ b/custom-login.php @@ -3,11 +3,11 @@ * Plugin Name: Custom Login * Plugin URI: https://frosty.media/plugins/custom-login * Description: A simple way to customize your WordPress wp-login.php screen! A Frosty Media 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 diff --git a/phpcs-ruleset.xml b/phpcs-ruleset.xml index caac8b1..42804fa 100644 --- a/phpcs-ruleset.xml +++ b/phpcs-ruleset.xml @@ -23,7 +23,7 @@ - + diff --git a/readme.txt b/readme.txt index 9bce8cf..9292a9a 100755 --- a/readme.txt +++ b/readme.txt @@ -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 @@ -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" diff --git a/resources/views/wp-login/style.php b/resources/views/wp-login/style.php index bdcefc8..3a8fec6 100644 --- a/resources/views/wp-login/style.php +++ b/resources/views/wp-login/style.php @@ -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"; @@ -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)); } @@ -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 } /** diff --git a/src/CustomLogin.php b/src/CustomLogin.php index 3888638..9678b7f 100644 --- a/src/CustomLogin.php +++ b/src/CustomLogin.php @@ -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.