0
X
Add Snippet To Project
New Project
Add To Existing Project
<?php
// Add last updated column to plugins list page
add_filter( 'manage_plugins_columns', 'atar4u_add_last_updated_column' );
add_action( 'manage_plugins_custom_column', 'atar4u_display_last_updated_column', 10, 3 );
function atar4u_add_last_updated_column( $columns ) {
$columns['last_updated'] = __( 'Last Updated', 'wpturbo' );
return $columns;
}
function wpturbo_display_last_updated_column( $column_name, $plugin_file, $plugin_data ) {
if ( 'last_updated' === $column_name ) {
$last_updated = strtotime( $plugin_data['Last Updated'] );
echo esc_html( human_time_diff( $last_updated ) . ' ago' );
}
}
Adds a column to plugins list, so you can know when the plugin was updated last time