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/bookmark.php

    r48591 r50558  
    5454    $_bookmark = sanitize_bookmark( $_bookmark, $filter );
    5555
    56     if ( OBJECT == $output ) {
     56    if ( OBJECT === $output ) {
    5757        return $_bookmark;
    58     } elseif ( ARRAY_A == $output ) {
     58    } elseif ( ARRAY_A === $output ) {
    5959        return get_object_vars( $_bookmark );
    60     } elseif ( ARRAY_N == $output ) {
     60    } elseif ( ARRAY_N === $output ) {
    6161        return array_values( get_object_vars( $_bookmark ) );
    6262    } else {
Note: See TracChangeset for help on using the changeset viewer.