mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@50558 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -218,11 +218,11 @@ function get_comment( $comment = null, $output = OBJECT ) {
|
||||
*/
|
||||
$_comment = apply_filters( 'get_comment', $_comment );
|
||||
|
||||
if ( OBJECT == $output ) {
|
||||
if ( OBJECT === $output ) {
|
||||
return $_comment;
|
||||
} elseif ( ARRAY_A == $output ) {
|
||||
} elseif ( ARRAY_A === $output ) {
|
||||
return $_comment->to_array();
|
||||
} elseif ( ARRAY_N == $output ) {
|
||||
} elseif ( ARRAY_N === $output ) {
|
||||
return array_values( $_comment->to_array() );
|
||||
}
|
||||
return $_comment;
|
||||
|
||||
Reference in New Issue
Block a user