Skip to content

Commit

Permalink
Updated array syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dcooney committed Jan 16, 2023
1 parent e411787 commit e06ba52
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions class-connekt-plugin-installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -77,8 +77,8 @@ public static function init( $plugins ) {
'donate_link' => false,
'icons' => true,
'banners' => true,
),
)
],
]
);

if ( ! is_wp_error( $api ) ) {
Expand Down Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 );
}

Expand Down Expand Up @@ -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 );
}
Expand Down

0 comments on commit e06ba52

Please sign in to comment.