Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

I18n - Remove unnecessary concatenation. #117

Merged
merged 1 commit into from
May 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1328,21 +1328,15 @@ 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' ),
)
);
}

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' ),
)
);
}
Expand Down