From d08df74eb3d1f18d646aedaf970ce2507edad4c5 Mon Sep 17 00:00:00 2001 From: pedro-mendonca Date: Wed, 6 May 2020 23:25:26 +0100 Subject: [PATCH] Remove unnecessary concatenation. Fix #116 --- functions.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/functions.php b/functions.php index c2b3a1a..056daca 100755 --- a/functions.php +++ b/functions.php @@ -1328,10 +1328,7 @@ function wp_autoupdates_toggle_auto_updates() { if ( ! $all_items[ $asset ] ) { wp_send_json_error( array( - 'error' => sprintf( - __( 'Invalid data. %s does not exist.', 'wp-autoupdates' ), - 'plugin' === $type ? __( 'Plugin', 'wp-autoupdates' ) : __( 'Theme', 'wp-autoupdates' ) - ), + 'error' => 'plugin' === $type ? __( 'Invalid data. Plugin does not exist.', 'wp-autoupdates' ) : __( 'Invalid data. Theme does not exist.', 'wp-autoupdates' ), ) ); } @@ -1339,10 +1336,7 @@ function wp_autoupdates_toggle_auto_updates() { if ( ! current_user_can( $cap ) ) { wp_send_json_error( array( - 'error' => sprintf( - __( 'You do not have permission to modify %s.', 'wp-autoupdates' ), - 'plugin' === $type ? __( 'plugins', 'wp-autoupdates' ) : __( 'themes', 'wp-autoupdates' ) - ), + 'error' => 'plugin' === $type ? __( 'You do not have permission to modify plugins.', 'wp-autoupdates' ) : __( 'You do not have permission to modify themes.', 'wp-autoupdates' ), ) ); }