Code Duplication    Length = 4-4 lines in 2 locations

wp-admin/includes/ajax-actions.php 2 locations

@@ 3687-3690 (lines=4) @@
3684
		'newVersion' => '',
3685
	);
3686
3687
	if ( ! current_user_can( 'update_plugins' ) || 0 !== validate_file( $plugin ) ) {
3688
		$status['errorMessage'] = __( 'Sorry, you are not allowed to update plugins for this site.' );
3689
		wp_send_json_error( $status );
3690
	}
3691
3692
	$plugin_data          = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
3693
	$status['plugin']     = $plugin;
@@ 3788-3791 (lines=4) @@
3785
		'slug'   => sanitize_key( wp_unslash( $_POST['slug'] ) ),
3786
	);
3787
3788
	if ( ! current_user_can( 'delete_plugins' ) || 0 !== validate_file( $plugin ) ) {
3789
		$status['errorMessage'] = __( 'Sorry, you are not allowed to delete plugins for this site.' );
3790
		wp_send_json_error( $status );
3791
	}
3792
3793
	$plugin_data          = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
3794
	$status['plugin']     = $plugin;