Update plu-redux.php
Plugin now uses site's preferred date format. Also cleaned up some wonky formatting.
This commit is contained in:
parent
fc95c38368
commit
16f648e649
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @wordpress-plugin
|
||||
* Plugin Name: Plugin Last Updated Redux
|
||||
* Version: 2.2.0
|
||||
* Version: 2.2.1
|
||||
* Requires at least: 6.0
|
||||
* Requires PHP: 7.4
|
||||
* Author: Jason Cosper
|
||||
@ -60,7 +60,7 @@ function plu_redux_plugin_meta( $plugin_meta, $plugin_file ) {
|
||||
$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
|
||||
$warning = $is_old ? '⚠️ ' : ''; // if the last updated date is older than 2 years, add a warning symbol
|
||||
$plugin_meta['last_updated'] = $warning . 'Last Updated: ' . esc_html( $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
|
||||
}
|
||||
|
||||
return $plugin_meta; // return the modified plugin meta array
|
||||
|
Loading…
x
Reference in New Issue
Block a user