@@ 3575-3581 (lines=7) @@ | ||
3572 | function wp_ajax_install_plugin() { |
|
3573 | check_ajax_referer( 'updates' ); |
|
3574 | ||
3575 | if ( empty( $_POST['slug'] ) ) { |
|
3576 | wp_send_json_error( array( |
|
3577 | 'slug' => '', |
|
3578 | 'errorCode' => 'no_plugin_specified', |
|
3579 | 'errorMessage' => __( 'No plugin specified.' ), |
|
3580 | ) ); |
|
3581 | } |
|
3582 | ||
3583 | $status = array( |
|
3584 | 'install' => 'plugin', |
|
@@ 3670-3676 (lines=7) @@ | ||
3667 | function wp_ajax_update_plugin() { |
|
3668 | check_ajax_referer( 'updates' ); |
|
3669 | ||
3670 | if ( empty( $_POST['plugin'] ) || empty( $_POST['slug'] ) ) { |
|
3671 | wp_send_json_error( array( |
|
3672 | 'slug' => '', |
|
3673 | 'errorCode' => 'no_plugin_specified', |
|
3674 | 'errorMessage' => __( 'No plugin specified.' ), |
|
3675 | ) ); |
|
3676 | } |
|
3677 | ||
3678 | $plugin = plugin_basename( sanitize_text_field( wp_unslash( $_POST['plugin'] ) ) ); |
|
3679 | ||
@@ 3773-3779 (lines=7) @@ | ||
3770 | function wp_ajax_delete_plugin() { |
|
3771 | check_ajax_referer( 'updates' ); |
|
3772 | ||
3773 | if ( empty( $_POST['slug'] ) || empty( $_POST['plugin'] ) ) { |
|
3774 | wp_send_json_error( array( |
|
3775 | 'slug' => '', |
|
3776 | 'errorCode' => 'no_plugin_specified', |
|
3777 | 'errorMessage' => __( 'No plugin specified.' ), |
|
3778 | ) ); |
|
3779 | } |
|
3780 | ||
3781 | $plugin = plugin_basename( sanitize_text_field( wp_unslash( $_POST['plugin'] ) ) ); |
|
3782 |