Make WordPress Core

Changeset 28359


Ignore:
Timestamp:
05/10/2014 11:56:12 PM (10 years ago)
Author:
wonderboymusic
Message:

Remove the title attribute from markup generated in wp-includes/category-template.php:

  • get_category_parents()
  • get_the_category_list()
  • wp_generate_tag_cloud()
  • Walker_Category::start_el()

Props joedolson.
Fixes #26557.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r27720 r28359  
    5757
    5858    if ( $link )
    59         $chain .= '<a href="' . esc_url( get_category_link( $parent->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $parent->name ) ) . '">'.$name.'</a>' . $separator;
     59        $chain .= '<a href="' . esc_url( get_category_link( $parent->term_id ) ) . '">'.$name.'</a>' . $separator;
    6060    else
    6161        $chain .= $name.$separator;
     
    184184                    if ( $category->parent )
    185185                        $thelist .= get_category_parents( $category->parent, true, $separator );
    186                     $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
     186                    $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
    187187                    break;
    188188                case 'single':
    189                     $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>';
     189                    $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>';
    190190                    if ( $category->parent )
    191191                        $thelist .= get_category_parents( $category->parent, false, $separator );
     
    194194                case '':
    195195                default:
    196                     $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
     196                    $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
    197197            }
    198198        }
     
    207207                    if ( $category->parent )
    208208                        $thelist .= get_category_parents( $category->parent, true, $separator );
    209                     $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a>';
     209                    $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a>';
    210210                    break;
    211211                case 'single':
    212                     $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>';
     212                    $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>';
    213213                    if ( $category->parent )
    214214                        $thelist .= get_category_parents( $category->parent, false, $separator );
     
    217217                case '':
    218218                default:
    219                     $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a>';
     219                    $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a>';
    220220            }
    221221            ++$i;
     
    967967        $link = '<a href="' . esc_url( get_term_link($category) ) . '" ';
    968968        if ( $use_desc_for_title == 0 || empty($category->description) ) {
    969             $link .= 'title="' . esc_attr( sprintf(__( 'View all posts filed under %s' ), $cat_name) ) . '"';
     969            $link .= '';
    970970        } else {
    971971            /**
     
    994994                $alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"';
    995995            } else {
    996                 $title = ' title="' . $feed . '"';
    997996                $alt = ' alt="' . $feed . '"';
    998997                $name = $feed;
     
    10051004                $link .= $name;
    10061005            else
    1007                 $link .= "<img src='$feed_image'$alt$title" . ' />';
     1006                $link .= "<img src='$feed_image'$alt" . ' />';
    10081007
    10091008            $link .= '</a>';
Note: See TracChangeset for help on using the changeset viewer.