Make WordPress Core

Changeset 25675


Ignore:
Timestamp:
10/02/2013 10:50:50 PM (13 years ago)
Author:
nacin
Message:

Remove redundant title attributes.

props sabreuse.
see #24766.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-widgets.php

    r25332 r25675  
    575575                <?php while ( $r->have_posts() ) : $r->the_post(); ?>
    576576                        <li>
    577                                 <a href="<?php the_permalink() ?>" title="<?php echo esc_attr( get_the_title() ? get_the_title() : get_the_ID() ); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a>
     577                                <a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title() : the_ID(); ?></a>
    578578                        <?php if ( $show_date ) : ?>
    579579                                <span class="post-date"><?php echo get_the_date(); ?></span>
  • trunk/src/wp-includes/general-template.php

    r25671 r25675  
    884884function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {
    885885        $text = wptexturize($text);
    886         $title_text = esc_attr($text);
    887886        $url = esc_url($url);
    888887
    889888        if ('link' == $format)
    890                 $link_html = "\t<link rel='archives' title='$title_text' href='$url' />\n";
     889                $link_html = "\t<link rel='archives' title='" . esc_attr( $text ) . "' href='$url' />\n";
    891890        elseif ('option' == $format)
    892891                $link_html = "\t<option value='$url'>$before $text $after</option>\n";
    893892        elseif ('html' == $format)
    894                 $link_html = "\t<li>$before<a href='$url' title='$title_text'>$text</a>$after</li>\n";
     893                $link_html = "\t<li>$before<a href='$url'>$text</a>$after</li>\n";
    895894        else // custom
    896                 $link_html = "\t$before<a href='$url' title='$title_text'>$text</a>$after\n";
     895                $link_html = "\t$before<a href='$url'>$text</a>$after\n";
    897896
    898897        $link_html = apply_filters( 'get_archives_link', $link_html );
Note: See TracChangeset for help on using the changeset viewer.