[wp-trac] [WordPress Trac] #64784: Refactor: Remove unnecessary false check in oEmbed data fetching
WordPress Trac
noreply at wordpress.org
Tue Mar 3 09:21:33 UTC 2026
#64784: Refactor: Remove unnecessary false check in oEmbed data fetching
--------------------------+-----------------------------
Reporter: Soean | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The `get_data()` method of the `WP_oEmbed` class contains an unnecessary
return:
{{{#!php
<?php
public function get_data( $url, $args = '' ) {
// ...
if ( false === $data ) {
return false;
}
return $data;
}
}}}
We can remove the false check, and only return `$data`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64784>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list