Ticket #20359: category-template-#20359.php.diff
File category-template-#20359.php.diff, 3.0 KB (added by , 13 years ago) |
---|
-
category-template.php
390 390 * in the category. 391 391 * 'hide_empty' (bool|int) default is 1 - Whether to hide categories that 392 392 * don't have any posts attached to them. 393 * 'use_desc_for_title' (bool|int) default is 1 - Whether to use the 394 * description instead of the category title. 393 * 'use_desc_for_title' (string) default is 'desc' - Control title attributes 394 * of category links. 'desc' => Output cat descriptions; 'viewall' => Output 395 * 'View all posts filed under @category'; 'none' => Does not output titles. 395 396 * 'feed' - See {@link get_categories()}. 396 397 * 'feed_type' - See {@link get_categories()}. 397 398 * 'feed_image' - See {@link get_categories()}. … … 415 416 'orderby' => 'name', 'order' => 'ASC', 416 417 'style' => 'list', 417 418 'show_count' => 0, 'hide_empty' => 1, 418 'use_desc_for_title' => 1, 'child_of' => 0,419 'use_desc_for_title' => 'desc', 'child_of' => 0, 419 420 'feed' => '', 'feed_type' => '', 420 421 'feed_image' => '', 'exclude' => '', 421 422 'exclude_tree' => '', 'current_category' => 0, … … 826 827 $cat_name = esc_attr( $category->name ); 827 828 $cat_name = apply_filters( 'list_cats', $cat_name, $category ); 828 829 $link = '<a href="' . esc_attr( get_term_link($category) ) . '" '; 829 if ( $use_desc_for_title == 0 || empty($category->description) ) 830 if ( $use_desc_for_title === 'desc' ) 831 $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"'; 832 elseif ( $use_desc_for_title === 'viewall' ) 830 833 $link .= 'title="' . esc_attr( sprintf(__( 'View all posts filed under %s' ), $cat_name) ) . '"'; 831 else 832 $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';834 elseif ( $use_desc_for_title === 'none' ) 835 $link = $link; 833 836 $link .= '>'; 834 837 $link .= $cat_name . '</a>'; 835 838 -
deprecated.php
622 622 * @param int $optiondates 623 623 * @param int $optioncount 624 624 * @param int $hide_empty 625 * @param int$use_desc_for_title625 * @param string $use_desc_for_title 626 626 * @param bool $children 627 627 * @param int $child_of 628 628 * @param int $categories … … 634 634 * @return unknown 635 635 */ 636 636 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, 637 $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,637 $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 'desc', $children=false, $child_of=0, $categories=0, 638 638 $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) { 639 639 _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' ); 640 640