From 784908ae5fc548c5c8555d78f3bd8298a3efc49a Mon Sep 17 00:00:00 2001 From: desrosj Date: Mon, 8 Jun 2020 21:27:10 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@47929 git-svn-id: http://core.svn.wordpress.org/trunk@47702 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/translation-install.php | 4 ++-- .../rest-api/endpoints/class-wp-rest-themes-controller.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/translation-install.php b/wp-admin/includes/translation-install.php index 716567c21a..c03f69921d 100644 --- a/wp-admin/includes/translation-install.php +++ b/wp-admin/includes/translation-install.php @@ -175,7 +175,7 @@ function wp_install_language_form( $languages ) { '' . "\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 ) { '' . "\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'] ) ); diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php index dfc11edc08..f5aed07b64 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php @@ -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( diff --git a/wp-includes/version.php b/wp-includes/version.php index 435fcb41b2..10d7f15fe3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47927'; +$wp_version = '5.5-alpha-47929'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.