From e06ba52ead2669b799be32cbf7e4c6112f548995 Mon Sep 17 00:00:00 2001 From: Darren Cooney Date: Mon, 16 Jan 2023 10:00:59 -0500 Subject: [PATCH] Updated array syntax --- class-connekt-plugin-installer.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/class-connekt-plugin-installer.php b/class-connekt-plugin-installer.php index 2cd3c02..415638f 100644 --- a/class-connekt-plugin-installer.php +++ b/class-connekt-plugin-installer.php @@ -62,9 +62,9 @@ public static function init( $plugins ) { $api = plugins_api( 'plugin_information', - array( + [ 'slug' => sanitize_file_name( $plugin['slug'] ), - 'fields' => array( + 'fields' => [ 'short_description' => true, 'sections' => false, 'requires' => false, @@ -77,8 +77,8 @@ public static function init( $plugins ) { 'donate_link' => false, 'icons' => true, 'banners' => true, - ), - ) + ], + ] ); if ( ! is_wp_error( $api ) ) { @@ -208,10 +208,10 @@ public function cnkt_plugin_installer() { $msg = 'There was an error installing ' . $api->name . '.'; } - $json = array( + $json = [ 'status' => $status, 'msg' => $msg, - ); + ]; wp_send_json( $json ); } @@ -278,10 +278,10 @@ public function cnkt_plugin_activation() { $msg = 'There was an error activating ' . $api->name . '.'; } - $json = array( + $json = [ 'status' => $status, 'msg' => $msg, - ); + ]; wp_send_json( $json ); } @@ -339,14 +339,14 @@ public function cnkt_installer_enqueue_scripts() { wp_localize_script( 'plugin-installer', 'cnkt_installer_localize', - array( + [ 'ajax_url' => admin_url( 'admin-ajax.php' ), 'admin_nonce' => wp_create_nonce( 'cnkt_installer_nonce' ), 'install_now' => __( 'Are you sure you want to install this plugin?', 'cnkt-installer' ), 'install_btn' => __( 'Install Now', 'cnkt-installer' ), 'activate_btn' => __( 'Activate', 'cnkt-installer' ), 'installed_btn' => __( 'Activated', 'cnkt-installer' ), - ) + ] ); wp_enqueue_style( 'plugin-installer', CNKT_INSTALLER_PATH . 'assets/installer.css', '', CNKT_INSTALLER_VERSION ); }