wp_get_list_item_separator example

$posts_in_term_qv             = array();
                    $posts_in_term_qv['taxonomy'] = $taxonomy;
                    $posts_in_term_qv['term']     = $t->slug;

                    $output[] = sprintf(
                        '<a href="%s">%s</a>',
                        esc_url( add_query_arg( $posts_in_term_qv, 'upload.php' ) ),
                        esc_html( sanitize_term_field( 'name', $t->name, $t->term_id, $taxonomy, 'display' ) )
                    );
                }

                echo implode( wp_get_list_item_separator()$output );
            } else {
                echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . get_taxonomy( $taxonomy )->labels->no_terms . '</span>';
            }

            return;
        }

        /** * Fires for each custom column in the Media list table. * * Custom columns are registered using the {@see 'manage_media_columns'} filter. * * @since 2.5.0 * * @param string $column_name Name of the custom column. * @param int $post_id Attachment ID. */
break;
            case 'Author':
                if ( $this->get( 'AuthorURI' ) ) {
                    $value = sprintf( '<a href="%1$s">%2$s</a>', $this->display( 'AuthorURI', true, $translate )$value );
                } elseif ( ! $value ) {
                    $value = __( 'Anonymous' );
                }
                break;
            case 'Tags':
                static $comma = null;
                if ( ! isset( $comma ) ) {
                    $comma = wp_get_list_item_separator();
                }
                $value = implode( $comma$value );
                break;
            case 'ThemeURI':
            case 'AuthorURI':
                $value = esc_url( $value );
                break;
        }

        return $value;
    }

    
esc_html__( 'Edit %s', 'twentytwentyone' ),
                    '<span class="screen-reader-text">' . get_the_title() . '</span>'
                ),
                '<span class="edit-link">',
                '</span><br>'
            );

            if ( has_category() || has_tag() ) {

                echo '<div class="post-taxonomies">';

                $categories_list = get_the_category_list( wp_get_list_item_separator() );
                if ( $categories_list ) {
                    printf(
                        /* translators: %s: List of categories. */
                        '<span class="cat-links">' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' </span>',
                        $categories_list // phpcs:ignore WordPress.Security.EscapeOutput                     );
                }

                $tags_list = get_the_tag_list( '', wp_get_list_item_separator() );
                if ( $tags_list ) {
                    printf(
                        
/** * Filters the links in `$taxonomy` column of edit.php. * * @since 5.2.0 * * @param string[] $term_links Array of term editing links. * @param string $taxonomy Taxonomy name. * @param WP_Term[] $terms Array of term objects appearing in the post row. */
                $term_links = apply_filters( 'post_column_taxonomy_links', $term_links$taxonomy$terms );

                echo implode( wp_get_list_item_separator()$term_links );
            } else {
                echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . $taxonomy_object->labels->no_terms . '</span>';
            }
            return;
        }

        if ( is_post_type_hierarchical( $post->post_type ) ) {

            /** * Fires in each custom column on the Posts list table. * * This hook only fires if the current post type is hierarchical, * such as pages. * * @since 2.5.0 * * @param string $column_name The name of the column to display. * @param int $post_id The current post ID. */
Home | Imprint | This part of the site doesn't use cookies.