Coding Standards: PHP short ternary operator syntax is not allowed.

WPCS 2.2.0 added a sniff for detecting short ternary operator syntax, which is not allowed per the Core handbook.

Follow up of [47927].
Fixes #50258.

git-svn-id: https://develop.svn.wordpress.org/trunk@47929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2020-06-08 21:25:46 +00:00
parent 7a64133821
commit ba994f6c09
2 changed files with 3 additions and 3 deletions

View File

@ -175,7 +175,7 @@ function wp_install_language_form( $languages ) {
'<option value="%s" lang="%s" data-continue="%s"%s>%s</option>' . "\n",
esc_attr( $language['language'] ),
esc_attr( current( $language['iso'] ) ),
esc_attr( $language['strings']['continue'] ?: 'Continue' ),
esc_attr( $language['strings']['continue'] ? $language['strings']['continue'] : 'Continue' ),
in_array( $language['language'], $installed_languages, true ) ? ' data-installed="1"' : '',
esc_html( $language['native_name'] )
);
@ -189,7 +189,7 @@ function wp_install_language_form( $languages ) {
'<option value="%s" lang="%s" data-continue="%s"%s>%s</option>' . "\n",
esc_attr( $language['language'] ),
esc_attr( current( $language['iso'] ) ),
esc_attr( $language['strings']['continue'] ?: 'Continue' ),
esc_attr( $language['strings']['continue'] ? $language['strings']['continue'] : 'Continue' ),
in_array( $language['language'], $installed_languages, true ) ? ' data-installed="1"' : '',
esc_html( $language['native_name'] )
);

View File

@ -144,7 +144,7 @@ class WP_REST_Themes_Controller extends WP_REST_Controller {
if ( rest_is_field_included( 'screenshot', $fields ) ) {
// Using $theme->get_screenshot() with no args to get absolute URL.
$data['screenshot'] = $theme->get_screenshot() ?: '';
$data['screenshot'] = $theme->get_screenshot() ? $theme->get_screenshot() : '';
}
$rich_field_mappings = array(