WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/02/2019 11:41:16 PM (17 months ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r45424 r45590  
    15801580
    15811581        if ( in_array( 'template', $fields, true ) ) {
    1582             if ( $template = get_page_template_slug( $post->ID ) ) {
     1582            $template = get_page_template_slug( $post->ID );
     1583            if ( $template ) {
    15831584                $data['template'] = $template;
    15841585            } else {
     
    17481749
    17491750        // If we have a featured media, add that.
    1750         if ( $featured_media = get_post_thumbnail_id( $post->ID ) ) {
     1751        $featured_media = get_post_thumbnail_id( $post->ID );
     1752        if ( $featured_media ) {
    17511753            $image_url = rest_url( 'wp/v2/media/' . $featured_media );
    17521754
Note: See TracChangeset for help on using the changeset viewer.