diff --git a/changelog.txt b/changelog.txt index cbfbb4f..b112b94 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,31 @@ == Changelog == += 1.2.7 = + +_Release date: 2026-11-04_ + +**Changed** + +* Compatibility verified on WordPress 7.2 (beta 4, single site, network-activation header unchanged): activation, admin menu, settings page and Manager notices work with no PHP notices or warnings on PHP 8.6 (debug.log and console clean). +* PHP support documented up to 8.6: full-range PHPCompatibility scan (5.6-8.6), lint across PHP 7.0-8.6 binaries, and PHPCS, PHPStan and PHPUnit runs on PHP 8.6.0RC3. The only 5.6 blocker remains the bool return type added in 1.2.6, so the real minimum stays PHP 7.0; the real WordPress floor stays 4.0 (wp-compat scan). +* The admin-menu icon stays `dashicons-admin-site`: the WordPress icons system shipped in 7.0/7.1 and 7.2 integrates it into admin menus for core icons only, rendering plugin Dashicons through its Dashicons back-compat path (`wp-includes/icons.php`, `wp-admin/menu-header.php`). No SVG migration is needed; switching to `wp_get_icon()` icon names would break every version before 7.2. +* Notice dismissal (one user-meta read) is now checked before the Manager plugin-list scan in `render_manager_notice()` and `enqueue_scripts()`, so users who dismissed the notice never trigger the scan (micro-optimization deferred from the 1.2.6 audit). +* Added a direct-access guard (`ABSPATH` check) to the main class file (housekeeping deferred from the 1.2.6 audit). +* Tooling: PHPStan raised to level max without baseline; preflight PHPCompatibility ceiling extended to 8.6 and the coverage run now selects a PHP binary with a coverage driver. + +**Compatibility** + +* WordPress: 4.0 - 7.2 +* PHP: 7.0 - 8.6 +* MariaDB: 11.8 (staging) + +**Tests** + +* PHP Coding Standards: 3.13.6 +* WordPress Coding Standards: 3.4.1 +* PHPStan: 2.3.5, level max without baseline, with wp-compat (Requires at least 4.0) +* PHPUnit: 9.6.38 (plugin header tests included, line coverage 89.8%, green on PHP 7.4/8.0/8.3/8.4/8.5/8.6) + = 1.2.6 = _Release date: 2026-08-24_ diff --git a/includes/class-robotstxt-hello-plugin.php b/includes/class-robotstxt-hello-plugin.php index 1544d5f..b26ad44 100644 --- a/includes/class-robotstxt-hello-plugin.php +++ b/includes/class-robotstxt-hello-plugin.php @@ -6,6 +6,10 @@ * @package Robotstxt_Hello */ +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + if ( ! class_exists( 'Robotstxt_Hello_Plugin' ) ) { /** * Handles registration of the Hello menu, page and notices. @@ -176,6 +180,8 @@ if ( ! class_exists( 'Robotstxt_Hello_Plugin' ) ) { * for users who have not dismissed it yet. * * @since 1.2.4 + * @since 1.2.7 Checks the dismissal flag first, so users who dismissed + * the notice never trigger the plugin-list scan. * * @return void */ @@ -190,7 +196,7 @@ if ( ! class_exists( 'Robotstxt_Hello_Plugin' ) ) { return; } - if ( $this->is_manager_active() || $this->is_notice_dismissed() ) { + if ( $this->is_notice_dismissed() || $this->is_manager_active() ) { return; } @@ -225,6 +231,8 @@ if ( ! class_exists( 'Robotstxt_Hello_Plugin' ) ) { * Enqueues the dismissal script on the plugins list page. * * @since 1.2.4 + * @since 1.2.7 Checks the dismissal flag first, so users who dismissed + * the notice never trigger the plugin-list scan. * * @param string $hook_suffix Current admin page hook suffix. * @return void @@ -234,7 +242,7 @@ if ( ! class_exists( 'Robotstxt_Hello_Plugin' ) ) { return; } - if ( $this->is_manager_active() || $this->is_notice_dismissed() ) { + if ( $this->is_notice_dismissed() || $this->is_manager_active() ) { return; } diff --git a/readme.txt b/readme.txt index 0d5dcf7..4a078e6 100644 --- a/readme.txt +++ b/readme.txt @@ -3,9 +3,9 @@ Contributors: robotstxt, javiercasares Tags: hello-world Requires at least: 4.0 Tested up to: 7.2 -Stable tag: 1.2.6 +Stable tag: 1.2.7 Requires PHP: 7.0 -Version: 1.2.6 +Version: 1.2.7 License: GPL-3.0-or-later License URI: https://www.gnu.org/licenses/gpl-3.0.txt @@ -36,10 +36,17 @@ Automatic updates for this plugin are delivered through the ROBOTSTXT ecosystem == Compatibility == * WordPress: 4.0 - 7.2 -* PHP: 7.0 - 8.5 +* PHP: 7.0 - 8.6 == Changelog == += 1.2.7 = +* Compatibility verified on WordPress 7.2 (beta 4, single site): activation, admin menu, settings page and Manager notices work with no PHP notices or warnings on PHP 8.6. +* PHP support documented up to 8.6, verified with a full-range PHPCompatibility scan (5.6-8.6) and PHPCS, PHPStan and PHPUnit runs on PHP 8.6. The real minimum versions stay at WordPress 4.0 and PHP 7.0. +* The admin-menu icon stays a Dashicon: WordPress 7.2 integrates its icons system into admin menus for core icons only and renders plugin Dashicons through its back-compat path, so no SVG migration is needed and older WordPress versions keep working. +* Users who dismissed the Manager notice no longer trigger the plugin-list scan; the cheap dismissal check now runs first. +* Added a direct-access guard to the main class file. + = 1.2.6 = * Manager (by ROBOTSTXT) detection now uses the ecosystem presence constant ROBOTSTXT_MANAGER_NOTICED (Manager 1.6.2+) instead of scanning the active plugins list, with a fallback plugin-list scan for older Manager versions. * Minimum PHP version raised from 5.6 to 7.0. The plugin shows an admin notice instead of running on older PHP versions. @@ -47,13 +54,6 @@ Automatic updates for this plugin are delivered through the ROBOTSTXT ecosystem = 1.2.5 = * Fixed a conflict on WordPress 4.0-6.4 where the Hello menu item could remove another plugin's top-level menu (and vice versa) when both used the same menu position. The menu is now registered at position 1000, past the last core separator (99), so it renders at the bottom of the menu. -= 1.2.4 = -* Updates are now delivered through Manager (by ROBOTSTXT): the bundled auto-updater was removed and a dismissible notice on the Plugins screen recommends installing the manager plugin when it is not active. -* Added a permanent notice on the plugin settings page when Manager (by ROBOTSTXT) is not available. -* Added a setting to remove plugin data on uninstall (data is preserved by default). -* Restored the real minimum requirements: WordPress 4.0 and PHP 5.6, verified with a full-range compatibility scan. -* Author, contributors and plugin URLs now point to the ROBOTSTXT software site. - = Previous versions = If you want to see the full changelog, visit the [changelog](https://www.robotstxt.software/plugins/robotstxt-hello/) page. diff --git a/robotstxt-hello.php b/robotstxt-hello.php index 3889ad6..144bca3 100644 --- a/robotstxt-hello.php +++ b/robotstxt-hello.php @@ -4,7 +4,7 @@ * Plugin URI: https://www.robotstxt.software/plugins/robotstxt-hello/ * Update URI: https://www.robotstxt.software/plugins/robotstxt-hello/ * Description: Adds a Hello admin page for demonstration purposes. - * Version: 1.2.6 + * Version: 1.2.7 * Requires at least: 4.0 * Requires PHP: 7.0 * Network: true @@ -46,7 +46,7 @@ function robotstxt_hello_render_php_version_notice() { ); } -define( 'ROBOTSTXT_HELLO_VERSION', '1.2.6' ); +define( 'ROBOTSTXT_HELLO_VERSION', '1.2.7' ); define( 'ROBOTSTXT_HELLO_FILE', __FILE__ ); require_once __DIR__ . '/includes/class-robotstxt-hello-plugin.php';