Compare commits

..

1 Commits
2.2.2 ... main

Author SHA1 Message Date
Jason Cosper
39c1cbd522
Accessability improvements! 2023-06-19 09:09:09 -07:00
2 changed files with 6 additions and 2 deletions

View File

@ -64,6 +64,10 @@ Sadly, no. PLU Redux only works with plugins that are available in the WordPress
## Changelog ## Changelog
### 2.2.3
* Added `aria-label` to warning emoji to improve accessability. Special thanks to Dale Reardon for letting me know about this!
### 2.2.2 ### 2.2.2
* Making an attempt to meet WP Plugin Directory requirements. * Making an attempt to meet WP Plugin Directory requirements.

View File

@ -16,7 +16,7 @@
* *
* @wordpress-plugin * @wordpress-plugin
* Plugin Name: PLU Redux * Plugin Name: PLU Redux
* Version: 2.2.2 * Version: 2.2.3
* Requires at least: 6.0 * Requires at least: 6.0
* Requires PHP: 7.4 * Requires PHP: 7.4
* Author: Jason Cosper * Author: Jason Cosper
@ -59,7 +59,7 @@ function plu_redux_plugin_meta( $plugin_meta, $plugin_file ) {
$two_years_ago = strtotime('-2 years'); // get a Unix timestamp for 2 years ago $two_years_ago = strtotime('-2 years'); // get a Unix timestamp for 2 years ago
$last_updated_timestamp = strtotime($last_updated); // get a Unix timestamp for the last updated date $last_updated_timestamp = strtotime($last_updated); // get a Unix timestamp for the last updated date
$is_old = $last_updated_timestamp < $two_years_ago; // check if the last updated date is older than 2 years $is_old = $last_updated_timestamp < $two_years_ago; // check if the last updated date is older than 2 years
$warning = $is_old ? '⚠️ ' : ''; // if the last updated date is older than 2 years, add a warning symbol $warning = $is_old ? '<span role="img" aria-label="warning">⚠️</span> ' : ''; // if the last updated date is older than 2 years, add a warning symbol
$plugin_meta['last_updated'] = $warning . 'Last Updated: ' . date_i18n( get_option( 'date_format' ), strtotime($last_updated)); // add the last updated date to the plugin meta array $plugin_meta['last_updated'] = $warning . 'Last Updated: ' . date_i18n( get_option( 'date_format' ), strtotime($last_updated)); // add the last updated date to the plugin meta array
} }