Make WordPress Core

Changeset 47929


Ignore:
Timestamp:
06/08/2020 09:25:46 PM (4 years ago)
Author:
desrosj
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/translation-install.php

    r47550 r47929  
    176176                esc_attr( $language['language'] ),
    177177                esc_attr( current( $language['iso'] ) ),
    178                 esc_attr( $language['strings']['continue'] ?: 'Continue' ),
     178                esc_attr( $language['strings']['continue'] ? $language['strings']['continue'] : 'Continue' ),
    179179                in_array( $language['language'], $installed_languages, true ) ? ' data-installed="1"' : '',
    180180                esc_html( $language['native_name'] )
     
    190190            esc_attr( $language['language'] ),
    191191            esc_attr( current( $language['iso'] ) ),
    192             esc_attr( $language['strings']['continue'] ?: 'Continue' ),
     192            esc_attr( $language['strings']['continue'] ? $language['strings']['continue'] : 'Continue' ),
    193193            in_array( $language['language'], $installed_languages, true ) ? ' data-installed="1"' : '',
    194194            esc_html( $language['native_name'] )
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php

    r47921 r47929  
    145145        if ( rest_is_field_included( 'screenshot', $fields ) ) {
    146146            // Using $theme->get_screenshot() with no args to get absolute URL.
    147             $data['screenshot'] = $theme->get_screenshot() ?: '';
     147            $data['screenshot'] = $theme->get_screenshot() ? $theme->get_screenshot() : '';
    148148        }
    149149
Note: See TracChangeset for help on using the changeset viewer.