Make WordPress Core


Ignore:
Timestamp:
06/02/2020 05:03:06 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Bundled Themes: Consistently check for WP_Error before outputting get_the_tag_list().

Some themes already had these checks in place as a result of [41756], but not others.

Props sixhours, davidakennedy, SergeyBiryukov.
Fixes #39860.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/inc/template-tags.php

    r47122 r47886  
    9797            /* translators: Used between list items, there is a space after the comma. */
    9898            $tags_list = get_the_tag_list( '', __( ', ', 'twentynineteen' ) );
    99             if ( $tags_list ) {
     99            if ( $tags_list && ! is_wp_error( $tags_list ) ) {
    100100                printf(
    101101                    /* translators: 1: SVG icon. 2: Posted in label, only visible to screen readers. 3: List of tags. */
Note: See TracChangeset for help on using the changeset viewer.