Title filtering from jhodgdon. fixes #3926

git-svn-id: http://svn.automattic.com/wordpress/trunk@5013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-03-10 03:56:35 +00:00
parent 3802dee776
commit 774bdc405b
2 changed files with 8 additions and 3 deletions

View File

@ -580,13 +580,14 @@ class Walker_Category extends Walker {
extract($args);
$cat_name = attribute_escape( $category->cat_name);
$cat_name = apply_filters( 'list_cats', $cat_name, $category );
$link = '<a href="' . get_category_link( $category->cat_ID ) . '" ';
if ( $use_desc_for_title == 0 || empty($category->category_description) )
$link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
else
$link .= 'title="' . attribute_escape( apply_filters( 'category_description', $category->category_description, $category )) . '"';
$link .= '>';
$link .= apply_filters( 'list_cats', $category->cat_name, $category ).'</a>';
$link .= $cat_name . '</a>';
if ( (! empty($feed_image)) || (! empty($feed)) ) {
$link .= ' ';

View File

@ -582,12 +582,16 @@ function get_calendar($initial = true) {
);
if ( $ak_post_titles ) {
foreach ( $ak_post_titles as $ak_post_title ) {
$post_title = apply_filters( "the_title", $ak_post_title->post_title );
$post_title = str_replace('"', '&quot;', wptexturize( $post_title ));
if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) )
$ak_titles_for_day['day_'.$ak_post_title->dom] = '';
if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one
$ak_titles_for_day["$ak_post_title->dom"] = str_replace('"', '&quot;', wptexturize($ak_post_title->post_title));
$ak_titles_for_day["$ak_post_title->dom"] = $post_title;
else
$ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '&quot;', wptexturize($ak_post_title->post_title));
$ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title;
}
}