From 0c16b76f17bae762d977596b8f9eb84062edb6a1 Mon Sep 17 00:00:00 2001 From: Jason Cosper Date: Fri, 26 May 2023 16:55:01 -0700 Subject: [PATCH] Update `plu-redux.php` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed issue #1 — bug that would arise when WP-CLI is not available * Added Git Updater header --- plu-redux.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plu-redux.php b/plu-redux.php index 2f6bd92..43c00d9 100644 --- a/plu-redux.php +++ b/plu-redux.php @@ -24,6 +24,7 @@ * License: GPL-2.0+ * License URI: https://www.gnu.org/licenses/gpl-2.0.txt * Description: Display the last updated date for plugins in the WordPress Plugin Directory. + * GitHub Plugin URI: boogah/plu-redux */ // If this file is called directly, abort. @@ -131,4 +132,6 @@ function plu_redux_last_updated_command() { $table->display(); } -\WP_CLI::add_command('plu list', 'plu_redux_last_updated_command'); +if ( class_exists( 'WP_CLI' ) ) { + \WP_CLI::add_command('plu list', 'plu_redux_last_updated_command'); +}