IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 4210 | 4210 | 'slug' => sanitize_key( wp_unslash( $_POST['slug'] ) ), |
| 4211 | 4211 | ); |
| 4212 | 4212 | |
| 4213 | | if ( ! current_user_can( 'delete_plugins' ) || 0 !== validate_file( $plugin ) ) { |
| 4214 | | $status['errorMessage'] = __( 'Sorry, you are not allowed to delete plugins for this site.' ); |
| | 4213 | if ( ! current_user_can( 'delete_plugin', $plugin ) || 0 !== validate_file( $plugin ) ) { |
| | 4214 | $status['errorMessage'] = __( 'Sorry, you are not allowed to delete this plugin.' ); |
| 4215 | 4215 | wp_send_json_error( $status ); |
| 4216 | 4216 | } |
| 4217 | 4217 | |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 628 | 628 | /* translators: %s: plugin name */ |
| 629 | 629 | $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>'; |
| 630 | 630 | } |
| 631 | | if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) { |
| | 631 | if ( current_user_can( 'delete_plugin', $plugin_file ) && ! is_plugin_active( $plugin_file ) ) { |
| 632 | 632 | /* translators: %s: plugin name */ |
| 633 | 633 | $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>'; |
| 634 | 634 | } |
| … |
… |
|
| 653 | 653 | $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>'; |
| 654 | 654 | } |
| 655 | 655 | |
| 656 | | if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) { |
| | 656 | if ( ! is_multisite() && current_user_can( 'delete_plugin', $plugin_file ) ) { |
| 657 | 657 | /* translators: %s: plugin name */ |
| 658 | 658 | $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>'; |
| 659 | 659 | } |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 248 | 248 | exit; |
| 249 | 249 | |
| 250 | 250 | case 'delete-selected': |
| 251 | | if ( ! current_user_can( 'delete_plugins' ) ) { |
| 252 | | wp_die( __( 'Sorry, you are not allowed to delete plugins for this site.' ) ); |
| | 251 | if ( ! current_user_can( 'delete_plugin', $plugin ) ) { |
| | 252 | wp_die( __( 'Sorry, you are not allowed to delete this plugin.' ) ); |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | check_admin_referer( 'bulk-plugins' ); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 416 | 416 | break; |
| 417 | 417 | case 'update_plugins': |
| 418 | 418 | case 'delete_plugins': |
| | 419 | case 'delete_plugin': |
| 419 | 420 | case 'install_plugins': |
| 420 | 421 | case 'upload_plugins': |
| 421 | 422 | case 'update_themes': |