Make WordPress Core


Ignore:
Timestamp:
03/21/2021 12:39:25 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison for return type checks in a few functions:

  • get_bookmark()
  • get_comment()
  • get_post()
  • get_children()
  • wp_get_recent_posts()
  • wp_get_post_revision()
  • wp_get_nav_menu_items()

Follow-up to [45710] for get_term(), [48507] for wpdb::get_row() and wpdb::get_results().

See #52627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/revision.php

    r49108 r50558  
    372372    }
    373373
    374     if ( OBJECT == $output ) {
     374    if ( OBJECT === $output ) {
    375375        return $revision;
    376     } elseif ( ARRAY_A == $output ) {
     376    } elseif ( ARRAY_A === $output ) {
    377377        $_revision = get_object_vars( $revision );
    378378        return $_revision;
    379     } elseif ( ARRAY_N == $output ) {
     379    } elseif ( ARRAY_N === $output ) {
    380380        $_revision = array_values( get_object_vars( $revision ) );
    381381        return $_revision;
Note: See TracChangeset for help on using the changeset viewer.