Make WordPress Core


Ignore:
Timestamp:
03/21/2021 12:39:25 PM (6 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/nav-menu.php

    r50013 r50558  
    759759        }
    760760
    761         if ( ARRAY_A == $args['output'] ) {
     761        if ( ARRAY_A === $args['output'] ) {
    762762                $items = wp_list_sort(
    763763                        $items,
    … …  
    766766                        )
    767767                );
    768                 $i     = 1;
     768
     769                $i = 1;
     770
    769771                foreach ( $items as $k => $item ) {
    770772                        $items[ $k ]->{$args['output_key']} = $i++;
Note: See TracChangeset for help on using the changeset viewer.