mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Twenty Twenty-One: Check for WP_Error
before outputting get_the_tag_list()
.
This prevents a fatal error on PHP 8 and brings consistency with the other bundled themes. Follow-up to [47886]. Props josephscott, sabernhardt, poena, nirav7707, devsahadat. Fixes #60800. Built from https://develop.svn.wordpress.org/trunk@57991 git-svn-id: http://core.svn.wordpress.org/trunk@57477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7bb686d18b
commit
8689afae77
@ -110,7 +110,7 @@ if ( ! function_exists( 'twenty_twenty_one_entry_meta_footer' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tags_list = get_the_tag_list( '', wp_get_list_item_separator() );
|
$tags_list = get_the_tag_list( '', wp_get_list_item_separator() );
|
||||||
if ( $tags_list ) {
|
if ( $tags_list && ! is_wp_error( $tags_list ) ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: List of tags. */
|
/* translators: %s: List of tags. */
|
||||||
'<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>',
|
'<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>',
|
||||||
@ -152,7 +152,7 @@ if ( ! function_exists( 'twenty_twenty_one_entry_meta_footer' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tags_list = get_the_tag_list( '', wp_get_list_item_separator() );
|
$tags_list = get_the_tag_list( '', wp_get_list_item_separator() );
|
||||||
if ( $tags_list ) {
|
if ( $tags_list && ! is_wp_error( $tags_list ) ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: List of tags. */
|
/* translators: %s: List of tags. */
|
||||||
'<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>',
|
'<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>',
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-alpha-57990';
|
$wp_version = '6.6-alpha-57991';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user