mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-08 17:38:26 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@28359 git-svn-id: http://core.svn.wordpress.org/trunk@28187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f22beb987c
commit
9daf458ff0
@ -56,7 +56,7 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename =
|
||||
}
|
||||
|
||||
if ( $link )
|
||||
$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;
|
||||
$chain .= '<a href="' . esc_url( get_category_link( $parent->term_id ) ) . '">'.$name.'</a>' . $separator;
|
||||
else
|
||||
$chain .= $name.$separator;
|
||||
return $chain;
|
||||
@ -183,17 +183,17 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
|
||||
case 'multiple':
|
||||
if ( $category->parent )
|
||||
$thelist .= get_category_parents( $category->parent, true, $separator );
|
||||
$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>';
|
||||
$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
|
||||
break;
|
||||
case 'single':
|
||||
$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>';
|
||||
$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>';
|
||||
if ( $category->parent )
|
||||
$thelist .= get_category_parents( $category->parent, false, $separator );
|
||||
$thelist .= $category->name.'</a></li>';
|
||||
break;
|
||||
case '':
|
||||
default:
|
||||
$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>';
|
||||
$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
|
||||
}
|
||||
}
|
||||
$thelist .= '</ul>';
|
||||
@ -206,17 +206,17 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
|
||||
case 'multiple':
|
||||
if ( $category->parent )
|
||||
$thelist .= get_category_parents( $category->parent, true, $separator );
|
||||
$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>';
|
||||
$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a>';
|
||||
break;
|
||||
case 'single':
|
||||
$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>';
|
||||
$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>';
|
||||
if ( $category->parent )
|
||||
$thelist .= get_category_parents( $category->parent, false, $separator );
|
||||
$thelist .= "$category->name</a>";
|
||||
break;
|
||||
case '':
|
||||
default:
|
||||
$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>';
|
||||
$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a>';
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
@ -966,7 +966,7 @@ class Walker_Category extends Walker {
|
||||
|
||||
$link = '<a href="' . esc_url( get_term_link($category) ) . '" ';
|
||||
if ( $use_desc_for_title == 0 || empty($category->description) ) {
|
||||
$link .= 'title="' . esc_attr( sprintf(__( 'View all posts filed under %s' ), $cat_name) ) . '"';
|
||||
$link .= '';
|
||||
} else {
|
||||
/**
|
||||
* Filter the category description for display.
|
||||
@ -993,7 +993,6 @@ class Walker_Category extends Walker {
|
||||
if ( empty($feed) ) {
|
||||
$alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"';
|
||||
} else {
|
||||
$title = ' title="' . $feed . '"';
|
||||
$alt = ' alt="' . $feed . '"';
|
||||
$name = $feed;
|
||||
$link .= $title;
|
||||
@ -1004,7 +1003,7 @@ class Walker_Category extends Walker {
|
||||
if ( empty($feed_image) )
|
||||
$link .= $name;
|
||||
else
|
||||
$link .= "<img src='$feed_image'$alt$title" . ' />';
|
||||
$link .= "<img src='$feed_image'$alt" . ' />';
|
||||
|
||||
$link .= '</a>';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user