[wp-trac] [WordPress Trac] #49591: Minor code cleanup
WordPress Trac
noreply at wordpress.org
Sat Mar 7 14:55:05 UTC 2020
#49591: Minor code cleanup
-------------------------------+-----------------------------
Reporter: dontdream | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: minor | Keywords: has-patch
Focuses: |
-------------------------------+-----------------------------
In the function get_the_content() after the lines:
{{{
$_post = get_post( $post );
if ( ! ( $_post instanceof WP_Post ) ) {
return '';
}
}}}
the additional test:
{{{
if ( null === $post ) {
}}}
will always return false, and could be removed for clarity.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49591>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list