Ticket #16282: strict.16282.diff
| File strict.16282.diff, 1.3 KB (added by scribu, 2 years ago) |
|---|
-
wp-includes/taxonomy.php
877 877 if ( ! taxonomy_exists($taxonomy) ) 878 878 return false; 879 879 880 if ( empty($value) ) 881 return false; 882 880 883 if ( 'slug' == $field ) { 881 884 $field = 't.slug'; 882 $value = sanitize_title_for_query($value);883 if ( empty($value) )884 return false;885 885 } else if ( 'name' == $field ) { 886 886 // Assume already escaped 887 887 $value = stripslashes($value); … … 2813 2813 * @uses apply_filters() For the post_tag Taxonomy, Calls 'tag_link' with tag link and tag ID as parameters. 2814 2814 * @uses apply_filters() For the category Taxonomy, Calls 'category_link' filter on category link and category ID. 2815 2815 * 2816 * @param object|int|string $term 2817 * @param string $taxonomy (optional if $term is object)2818 * @return string|WP_Error HTML link to taxonomy term archive on success, WP_Error if term does not exist.2816 * @param object|int|string $term Term object, term_id or slug. 2817 * @param string $taxonomy Optional if $term is object. 2818 * @return string|WP_Error URL to taxonomy term archive on success, WP_Error if term not found. 2819 2819 */ 2820 2820 function get_term_link( $term, $taxonomy = '') { 2821 2821 global $wp_rewrite;
