Changeset 3266648
- Timestamp:
- 04/04/2025 01:44:46 AM (11 months ago)
- Location:
- plugins-last-updated-column/trunk
- Files:
-
- 3 edited
-
readme.md (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
sk-plugins-last-updated-column.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins-last-updated-column/trunk/readme.md
r3265996 r3266648 3 3 = 4 4 --- 5 This plugin adds columns to the admin plugin's page to show when each plugin was last updated or upgraded. 6 The functionality of this plugin was entirely [Karissa Skirmont](http://kissaskreations.com/ "Kissa's Kreations")'s idea. 5 This plugin adds two columns to the plugin's page in WordPress's admin to show when each plugin was "Last Updated" by the developer and when the plugin was "Last Upgraded" on the site. The "Last Updated" column will also show "Plugin not found" OR "Plugin has been closed!" if the plugin isn't on the repo anymore or has been closed. 6 7 The first time you load the plugins page, it will load very slowly due to many API calls made to WordPress.org in order to retrieve the last updated information. 8 9 This plugin makes 1 API call for each plugin installed. This data is cached for 24 hours, unless you manually clear the cache clearing via Admin Menu > Plugins > Plugin Columns. 10 11 12 The idea for this plugin's functionality and the artwork was by [Karissa Skirmont](http://karissaskirmont.com "karissaskirmont.com")'s of [Profoundly Purple](http://profoundlypurple.com "profoundlypurple.com"). 13 Plugin Developed by [Steven Kohlmeyer](http://stevenkohlmeyer.com "stevenkohlmeyer.com") with contributions by [Michael Preslar (http://drzimp.com "drzimp.com")]. 7 14 8 15 [Plugin Page](https://wordpress.org/plugins/plugins-last-updated-column/#developers "Plugins Last Updated Column") … … 27 34 --- 28 35 29 Changelo t36 Changelog 30 37 = 38 * 0.1.5 39 * Last Updated Column now displays if the plugin has been closed or isn't on the repo 40 * getPluginsLastUpdated() now respects WP_DEBUG 41 * Updated plugin description 31 42 * 0.1.4 32 43 * Fixed security issue -
plugins-last-updated-column/trunk/readme.txt
r3265996 r3266648 1 1 === Plugins Last Updated Column === 2 Contributors: Fastmover, karissa 3 Tags: plugins, plugins last updated, last updated, updated 2 3 Contributors: Fastmover, karissa, drzimp 4 Tags: plugins, plugins last updated, last updated, updated, plugin closed 4 5 Requires at least: 3.7 5 6 Tested up to: 6.7.2 6 Stable tag: 0.1.4 7 8 Stable tag: 0.1.5 7 9 License: GPLv2 or later 8 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 11 10 This plugin adds columns to the admin plugin's page to show when each plugin was last updated and upgraded.12 This plugin adds 2 columns to the admin plugin's page to show when each plugin was last updated and upgraded. 11 13 12 14 == Description == 13 15 14 This plugin adds a column to the plugin's page in WordPress's admin to show when each plugin was last updated. This causes the plugins page to load very slowly on the first page load due to many API calls made to wordPress.org in order to retrieve the last updated information. This plugin makes 1 API call for each plugin installed. This data is cached for 24 hours. The functionality of this plugin was entirely [Karissa Skirmont](http://kissaskreations.com/ "Kissa's Kreations")'s idea. [Plugin Page](http://stevenkohlmeyer.com/plugins-last-updated-column/ "Plugins Last Updated Column"). Artwork compliments of [Karissa](http://kissaskreations.com/ "Kissa's Kreations") 16 This plugin adds two columns to the plugin's page in WordPress's admin to show when each plugin was "Last Updated" by the developer and when the plugin was "Last Upgraded" on the site. The "Last Updated" column will also show "Plugin not found" OR "Plugin has been closed!" if the plugin isn't on the repo anymore or has been closed. 17 18 The first time you load the plugins page, it may load very slowly if you have a lot of plugins due to many API calls made to WordPress.org in order to retrieve the last updated information. 19 20 This plugin makes 1 API call for each plugin installed. This data is cached for 24 hours, unless you manually clear the cache clearing via Admin Menu > Plugins > Plugin Columns. 21 22 23 The idea for this plugin's functionality and the artwork was by [Karissa Skirmont](http://karissaskirmont.com "karissaskirmont.com")'s of [Profoundly Purple](http://profoundlypurple.com "profoundlypurple.com"). 24 Plugin Developed by [Steven Kohlmeyer](http://stevenkohlmeyer.com "stevenkohlmeyer.com") with contributions by [Michael Preslar (http://drzimp.com "drzimp.com")]. 15 25 16 26 == Installation == 17 27 18 1. Install this plugin either via the WordPress.org plugin directory, or by uploading the files to your server 19 2. Activate the plugin through the 'Plugins' menu in WordPress 20 3. That's it. You're ready to go !28 1. Install this plugin either via the WordPress.org plugin directory, or by uploading the files to your server. 29 2. Activate the plugin through the 'Plugins' menu in WordPress. If in a Multisite install, "Network Activate" to show on ALL sites in the install or only Activate individually on a per site basis. 30 3. That's it. You're ready to go clean up your plugin list of old or closed plugins! 21 31 22 32 == Screenshots == 23 33 24 1. As you can see, the plugins table nowhas 2 columns on the right side labeled: Last Updated and Last Upgraded.34 1. The plugins table has 2 columns on the right side labeled: Last Updated and Last Upgraded. 25 35 2. A page dedicated to clearing cache on the Last Updated Column. 26 36 3. Shows a WordPress MultiSite Network Plugin page with last updated / last upgraded columns. 27 37 28 38 == Changelog == 39 40 = 0.1.5 = 41 * Last Updated Column now displays if the plugin has been closed or isn't on the repo 42 * getPluginsLastUpdated() now respects WP_DEBUG 43 * Updated description 29 44 30 45 = 0.1.4 = … … 75 90 = 0.0.1 = 76 91 * Plugin adds a last updated column to the plugins page of the admin. 92 -
plugins-last-updated-column/trunk/sk-plugins-last-updated-column.php
r3265996 r3266648 3 3 * Plugin Name: Plugins Last Updated Column 4 4 * Plugin URI: http://stevenkohlmeyer.com/plugins-last-updated-column/ 5 * Description: This plugin adds a 'Last Updated' columnto the admin plugins page.6 * Version: 0.1. 45 * Description: This plugin adds 'Last Updated' and 'Last Upgraded' columns to the admin plugins page. 6 * Version: 0.1.5 7 7 * Author: Fastmover 8 8 * Author URI: http://StevenKohlmeyer.com … … 16 16 class SK_Plugins_Last_Updated_Column 17 17 { 18 public $cacheTime = 1800;18 public $cacheTime = 86400; 19 19 public $slugUpdated = "sk-plugin-last-updated "; 20 20 public $slugUpgraded = "sk-plugin-last-upgraded "; … … 86 86 <?php 87 87 88 if ( $lastUpdated !== "-1" && $lastUpdated !== -1 ) { 88 if ( $lastUpdated === false ) { 89 ?> 90 <span>Not Avail.</span> 91 <?php 92 93 } elseif ( is_numeric( $lastUpdated ) ) { 94 if ( $lastUpdated == -2 ) { 95 ?> 96 <strong class="plugin-last-updated-humanreadable" data-color="#ff0000"><strong>Plugin has been closed!</strong> 97 <?php 98 } elseif ( $lastUpdated == -3 ) { 99 ?> 100 <strong class="plugin-last-updated-humanreadable" data-color="#ff0000">Plugin not found</strong> 101 <?php 102 } else { 103 ?> 104 <span>Not Avail.</span> 105 <?php 106 } 107 108 } else { 89 109 90 110 if ( ! $this->currentDateTime ) { … … 121 141 ?> 122 142 <span><?php echo $dateLastUpdated; ?></span> 123 124 <?php 125 126 } else { 127 ?> 128 <span>Not Avail.</span> 129 <?php 130 } 131 132 ?> 133 <br/> 134 <span class="plugin-last-updated-humanreadable" data-color="<?php echo $color; ?>" 135 style="background-color: <?php echo $color; ?>"><?php echo $msg; ?></span> 143 <br/> 144 <span class="plugin-last-updated-humanreadable" data-color="<?php echo $color; ?>" 145 style="background-color: <?php echo $color; ?>"><?php echo $msg; ?></span> 136 146 <?php 147 } 137 148 } 138 149 … … 185 196 { 186 197 187 188 if ( ! get_transient ( $this->slugUpdated . $pluginSlug ) ) { 198 $retval = get_transient ( $this->slugUpdated . $pluginSlug ); 199 200 if ( ( $retval !== false ) && ( ! defined('WP_DEBUG') || ! WP_DEBUG ) ) { 201 return $retval; 202 } 189 203 190 204 include_once ( ABSPATH . 'wp-admin/includes/plugin-install.php' ); … … 200 214 /** Check for Errors & Display the results */ 201 215 if ( is_wp_error ( $call_api ) ) { 202 set_transient ( $this->slugUpdated . $pluginSlug, -1, $this->cacheTime ); 203 204 return -1; 216 217 /* 218 * plugin_api() doesn't differentiate between a network issue and a successful 219 * API request that returns json that contains a key of "error". Examples: 220 * {"error":"Plugin not found."} 221 * 222 { 223 "error": "closed", 224 "name": "Easy Testimonials", 225 "slug": "easy-testimonials", 226 "description": "This plugin has been closed as of July 19, 2024 and is not available for download. Reason: Security Issue.", 227 "closed": true, 228 "closed_date": "2024-07-19", 229 "reason": "security-issue", 230 "reason_text": "Security Issue" 231 } 232 233 * Unfortunately, plugin_api() also doesn't pass the returned json into WP_Error, 234 * so we can't get the "reason" or "closed_date". Best we can do is check the 235 * error message and go from there. 236 */ 237 238 $retval = false; 239 $errmsg = $call_api->get_error_message(); 240 241 if ( $errmsg == 'closed' ) { 242 $retval = -2; 243 } elseif ( $errmsg == 'Plugin not found.' ) { 244 $retval = -3; 245 } 246 247 if ( $retval !== false ) { 248 set_transient ( $this->slugUpdated . $pluginSlug, $retval, $this->cacheTime ); 249 } 250 251 return $retval; 205 252 } else { 206 253 if ( ! empty( $call_api->last_updated ) ) { … … 210 257 return $call_api->last_updated; 211 258 } else { 212 set_transient ( $this->slugUpdated . $pluginSlug, -1, $this->cacheTime ); 213 214 return -1; 215 } 216 } 217 218 } else { 219 //Debugging purposes: 220 //delete_transient( 'sk_plugins_last_updated' . $pluginSlug ); 221 222 return get_transient ( $this->slugUpdated . $pluginSlug ); 223 } 259 260 return false; 261 } 262 } 224 263 } 225 264
Note: See TracChangeset
for help on using the changeset viewer.