Ticket #42361: 42361.diff
File 42361.diff, 753 bytes (added by , 7 years ago) |
---|
-
src/wp-includes/taxonomy.php
767 767 768 768 if ( is_wp_error( $_term ) ) { 769 769 return $_term; 770 } elseif ( ! $_term ) {771 return null;772 770 } 773 771 774 772 /** … … 796 794 */ 797 795 $_term = apply_filters( "get_{$taxonomy}", $_term, $taxonomy ); 798 796 797 // If `$_term` doesn't exist by now bail with null. 798 if ( ! $_term ) { 799 return null; 800 } 801 799 802 // Bail if a filter callback has changed the type of the `$_term` object. 800 803 if ( ! ( $_term instanceof WP_Term ) ) { 801 804 return $_term; 802 } 805 } 803 806 804 807 // Sanitize term, according to the specified filter. 805 808 $_term->filter( $filter );