WordPress.org

Make WordPress Core

Ticket #35566: remove-tag-cloud-title-attribute.35566.diff

File remove-tag-cloud-title-attribute.35566.diff, 1.3 KB (added by adamsoucie, 2 years ago)

Patch to remove title attribute completely

  • src/wp-includes/category-template.php

    diff --git src/wp-includes/category-template.php src/wp-includes/category-template.php
    index 35d6c82..9e3fe05 100644
    function wp_generate_tag_cloud( $tags, $args = '' ) { 
    893893                        'id'         => $tag_id, 
    894894                        'url'        => '#' != $tag->link ? $tag->link : '#', 
    895895                        'name'       => $tag->name, 
    896                         'title'      => $title, 
    897896                        'slug'       => $tag->slug, 
    898897                        'real_count' => $real_count, 
    899898                        'class'      => 'tag-link-' . $tag_id, 
    function wp_generate_tag_cloud( $tags, $args = '' ) { 
    915914        // generate the output links array 
    916915        foreach ( $tags_data as $key => $tag_data ) { 
    917916                $class = $tag_data['class'] . ' tag-link-position-' . ( $key + 1 ); 
    918                 $a[] = "<a href='" . esc_url( $tag_data['url'] ) . "' class='" . esc_attr( $class ) . "' title='" . esc_attr( $tag_data['title'] ) . "' style='font-size: " . esc_attr( str_replace( ',', '.', $tag_data['font_size'] ) . $args['unit'] ) . ";'>" . esc_html( $tag_data['name'] ) . "</a>"; 
     917                $a[] = "<a href='" . esc_url( $tag_data['url'] ) . "' class='" . esc_attr( $class ) . "' style='font-size: " . esc_attr( str_replace( ',', '.', $tag_data['font_size'] ) . $args['unit'] ) . ";'>" . esc_html( $tag_data['name'] ) . "</a>"; 
    919918        } 
    920919 
    921920        switch ( $args['format'] ) {