Taxonomy: Avoid a fatal error in `the_tags()` in the event that `get_the_term_list()` returns a WP_Error.
Props michalzuber. See #37291. Built from https://develop.svn.wordpress.org/trunk@38777 git-svn-id: http://core.svn.wordpress.org/trunk@38720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e97ab5362b
commit
f40c2a62a6
|
@ -1142,7 +1142,12 @@ function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) {
|
|||
function the_tags( $before = null, $sep = ', ', $after = '' ) {
|
||||
if ( null === $before )
|
||||
$before = __('Tags: ');
|
||||
echo get_the_tag_list($before, $sep, $after);
|
||||
|
||||
$the_tags = get_the_tag_list( $before, $sep, $after );
|
||||
|
||||
if ( ! is_wp_error( $the_tags ) ) {
|
||||
echo $the_tags;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38776';
|
||||
$wp_version = '4.7-alpha-38777';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue