-
Notifications
You must be signed in to change notification settings - Fork 15
Release v1.42.0 #1703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Release v1.42.0 #1703
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
ded54fd
Add a SystemInfo class and tests for it
pattonwebz 736b933
Add the extra context data to the activate and checking crons
pattonwebz 948f88d
Update tests to cover actual functionality of the systeminfo getters
pattonwebz 17d9556
Move SystemInfo class to it's own namespace location
pattonwebz 6ff279b
Enforce always array even on parse failure for active theme and plugi…
pattonwebz 261f8d9
Use raw plugin headers and JSON-string fallbacks in SystemInfo context
Copilot fe127ba
Merge pull request #1695 from equalizedigital/release/1.41.0
pattonwebz 5a0c3ef
Replaced inline permission callback with a named method for improved …
pattonwebz e98494e
Merge pull request #1679 from equalizedigital/william/add-extra-compa…
pattonwebz 7239efc
Merge pull request #1697 from equalizedigital/william/no-issue/make-g…
pattonwebz 16a2132
Add: support for named anchors as jump targets in link validation
SteveJonesDev cd8449a
Add: enhance link validation to handle named anchors and empty href c…
SteveJonesDev e927611
Add tests for the API endpoints that power the stats requests
pattonwebz bf5948b
Don't include the 'tools' directory in code coverage checking
pattonwebz 997e678
chore: improve REST API test performance and assertions
pattonwebz 8f87dab
test: align REST API stats assertions with actual response shape
Copilot 5afbb03
test: refine stats value assertion style in endpoint test
Copilot 1bea54e
Merge pull request #1699 from equalizedigital/william/add-some-tests-…
pattonwebz b1c4426
Tweak some of the new test setup for rest api endpoints
pattonwebz 4025c07
Merge branch 'william/add-some-tests-for-rest-api-callbacks' of githu…
pattonwebz 6622d54
Refactor REST API stats validation in tests
pattonwebz 5ee4148
Merge pull request #1701 from equalizedigital/william/add-some-tests-…
pattonwebz fbbe6f9
docs: regenerate hooks docs
github-actions[bot] 9da8dd6
Add some checks for linkimproper anchors to only skip them if they ar…
pattonwebz a0ff0f7
Add some test cases for bypassed link improper when it's an anchor
pattonwebz caa8b4b
Add one more test case to cover named anchor that matches parity with…
pattonwebz 2501f1c
Merge pull request #1702 from equalizedigital/automation/regenerate-h…
SteveJonesDev a9e770d
Merge pull request #1698 from equalizedigital/steve/pro-808-improper-…
SteveJonesDev c5fd3bb
Bump version * Version: 1.41.0 -> 1.42.0
pattonwebz c324d0e
Resolve release 1.42.0 review follow-ups (tests, changelog, lockfile …
Copilot d9ae994
Add changelog entry for v1.42.0
pattonwebz 8431fe0
Merge branch 'release/1.42.0' of github.com:equalizedigital/accessibi…
pattonwebz 4a395ff
Add extra safety include for the get_plugin_data function and make ar…
pattonwebz 61f69c6
Add test to ensure plugins are valid and active when returned
pattonwebz 6131937
Merge branch 'main' into release/1.42.0
pattonwebz ac471ce
Add role="none" support alongside role="presentation" in image alt ch…
claude 532ad2a
Use role token list parsing in image alt checks for consistency
claude 694efa1
Add role="none" and multi-value token tests to image alt check test s…
claude 3ad6868
Move role="none/presentation" exclusion to rule selectors for img alt…
claude 01e5505
Merge pull request #1704 from equalizedigital/claude/update-gutenberg…
SteveJonesDev 51815d3
Update POT translation file
pattonwebz 41c4dc5
Merge pull request #1705 from equalizedigital/update-translations/dev…
pattonwebz baf9eca
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
ec78486
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
f825f99
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
a923f17
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
4147b2a
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
7f9a98e
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
1f77733
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
9541607
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
2abac32
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
c12e2eb
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
c355c65
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
6fca3e2
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
642a2aa
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
bbf0d98
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
5a91cc2
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
9ebf731
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
8206cbc
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
568790c
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
c804849
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
1ab2ed1
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
05e4d28
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
94628a0
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
5ce7d71
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
fe45b7b
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
fe679a5
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
eb4d3a3
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
da8da08
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
ff8f64d
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
472a6f7
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
2bd84af
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
833001c
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
0b94840
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
f024dd9
PTC accessibility-checker (1985): Automatic Translations May 19, 2026…
54e2803
Merge pull request #1706 from equalizedigital/ptc_1985_automatic_tran…
pattonwebz a01362f
Merge remote-tracking branch 'origin/develop' into release/1.42.0
pattonwebz fc890cc
Merge remote-tracking branch 'origin/release/1.42.0' into release/1.42.0
pattonwebz 77b9a85
Add changelog entry for new role="none" handling
pattonwebz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,167 @@ | ||
| <?php | ||
| /** | ||
| * System information helpers. | ||
| * | ||
| * @package Accessibility_Checker | ||
| */ | ||
|
|
||
| namespace EqualizeDigital\AccessibilityChecker\SystemInfo; | ||
|
|
||
| use WP_Theme; | ||
|
|
||
| /** | ||
| * Collects active plugin and theme information. | ||
| */ | ||
| class SystemInfo { | ||
|
|
||
| /** | ||
| * Returns active plugins with name, slug, and version. | ||
| * | ||
| * @return array<int, array<string, string>> | ||
| */ | ||
| public static function get_active_plugins() { | ||
| if ( ! function_exists( 'get_plugin_data' ) ) { | ||
| require_once ABSPATH . 'wp-admin/includes/plugin.php'; | ||
| } | ||
|
|
||
| $active_plugins = []; | ||
| $plugins = wp_get_active_and_valid_plugins(); | ||
|
|
||
| if ( is_array( $plugins ) ) { | ||
| foreach ( $plugins as $plugin_path ) { | ||
| $plugin_data = get_plugin_data( $plugin_path, false, false ); | ||
| if ( is_array( $plugin_data ) ) { | ||
| $active_plugins[] = [ | ||
| 'name' => $plugin_data['Name'] ?? '', | ||
| 'slug' => self::get_plugin_slug_from_path( $plugin_path ), | ||
| 'version' => $plugin_data['Version'] ?? '', | ||
| ]; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return $active_plugins; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the plugin slug from a plugin file path. | ||
| * | ||
| * @param string $plugin_path Path to a plugin file. | ||
| * @return string | ||
| */ | ||
| public static function get_plugin_slug_from_path( $plugin_path ) { | ||
| if ( ! is_string( $plugin_path ) || '' === $plugin_path ) { | ||
| return ''; | ||
| } | ||
|
|
||
| $relative = plugin_basename( $plugin_path ); | ||
| $dir = dirname( $relative ); | ||
|
|
||
| if ( '.' !== $dir ) { | ||
| return $dir; | ||
| } | ||
|
|
||
| return basename( $relative, '.php' ); | ||
| } | ||
|
|
||
| /** | ||
| * Returns active theme information, including parent data for child themes. | ||
| * | ||
| * @return array<string, mixed> | ||
| */ | ||
| public static function get_active_theme() { | ||
| $theme_data = wp_get_theme(); | ||
|
|
||
| $active_theme = self::get_theme_data_collection( $theme_data ); | ||
|
|
||
| $active_theme['accessibility_ready'] = self::is_theme_accessibility_ready( $theme_data ); | ||
|
|
||
| $active_theme['parent_theme'] = []; | ||
| if ( $theme_data->parent() ) { | ||
| $active_theme['parent_theme'] = self::get_theme_data_collection( $theme_data->parent() ); | ||
| } | ||
|
|
||
| return $active_theme; | ||
| } | ||
|
|
||
| /** | ||
| * Gets theme details as a normalized collection. | ||
| * | ||
| * @param mixed $theme Theme object. | ||
| * @return array<string, mixed> | ||
| */ | ||
| public static function get_theme_data_collection( $theme ) { | ||
| if ( ! is_a( $theme, '\\WP_Theme' ) ) { | ||
| return []; | ||
| } | ||
|
|
||
| return [ | ||
| 'name' => $theme->get( 'Name' ) ?? '', | ||
| 'slug' => $theme->get_stylesheet() ?? '', | ||
| 'version' => $theme->get( 'Version' ) ?? '', | ||
| 'tags' => $theme->get( 'Tags' ) ?? [], | ||
| ]; | ||
| } | ||
|
|
||
| /** | ||
| * Checks whether theme or parent theme is tagged accessibility-ready. | ||
| * | ||
| * @param WP_Theme $theme_data Theme object to check. | ||
| * @return bool | ||
| */ | ||
| public static function is_theme_accessibility_ready( WP_Theme $theme_data ) { | ||
| $tags = is_array( $theme_data->get( 'Tags' ) ) ? $theme_data->get( 'Tags' ) : []; | ||
|
|
||
| if ( $theme_data->parent() ) { | ||
| $parent_tags = $theme_data->parent()->get( 'Tags' ); | ||
| $tags = array_merge( $tags, is_array( $parent_tags ) ? $parent_tags : [] ); | ||
| } | ||
|
|
||
| return in_array( 'accessibility-ready', $tags, true ); | ||
| } | ||
|
|
||
| /** | ||
| * Gets the current WordPress environment type. | ||
| * | ||
| * @return string | ||
| */ | ||
| public static function get_environment_type() { | ||
| return function_exists( 'wp_get_environment_type' ) ? wp_get_environment_type() : 'production'; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the current WordPress version. | ||
| * | ||
| * @return string | ||
| */ | ||
| public static function get_wordpress_version() { | ||
| return (string) get_bloginfo( 'version' ); | ||
| } | ||
|
|
||
| /** | ||
| * Gets the current PHP version. | ||
| * | ||
| * @return string | ||
| */ | ||
| public static function get_php_version() { | ||
| return (string) phpversion(); | ||
| } | ||
|
|
||
| /** | ||
| * Gets a payload-ready set of system fields for license API requests. | ||
| * | ||
| * @return array<string, mixed> | ||
| */ | ||
| public static function get_license_request_context() { | ||
| $active_plugins = wp_json_encode( self::get_active_plugins() ); | ||
| $active_theme = wp_json_encode( self::get_active_theme() ); | ||
|
|
||
| return [ | ||
| 'environment' => self::get_environment_type(), | ||
| 'wp_version' => self::get_wordpress_version(), | ||
| 'php_version' => self::get_php_version(), | ||
| 'active_plugins' => false !== $active_plugins ? $active_plugins : '[]', | ||
| 'active_theme' => false !== $active_theme ? $active_theme : '{}', | ||
| ]; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.