| 299 | | if ( !empty($categories) ) foreach ( (array) $categories as $category ) { |
| 300 | | $cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter); |
| | 299 | if ( !empty($categories) ) foreach ( (array) $categories as $category ) { |
| | 300 | $cat_name = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter); |
| | 301 | $cats[$cat_name] = $category; |
| 312 | | elseif ( 'atom' == $type ) |
| 313 | | $the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', esc_attr( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), esc_attr( $cat_name ) ); |
| 314 | | else |
| 315 | | $the_list .= "\t\t<category><![CDATA[" . @html_entity_decode( $cat_name, ENT_COMPAT, get_option('blog_charset') ) . "]]></category>\n"; |
| | 312 | } elseif ( 'atom' == $type ) { |
| | 313 | $blog_url = apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ); |
| | 314 | $scheme = attribute_escape( $category->taxonomy =='post_tag' ? $blog_url . "/tag/" : $blog_url . "/category/" ); |
| | 315 | $label = attribute_escape( $cat_name ); |
| | 316 | $the_list .= "\n\t\t<category scheme=\"$scheme\" term=\"{$category->slug}\" label=\"$label\"/>\n"; |
| | 317 | } else { |
| | 318 | $domain = $category->taxonomy =='post_tag' ? "tag" : "category"; |
| | 319 | $the_list .= "\n\t\t<category domain=\"$domain\"><![CDATA[" . @html_entity_decode( $cat_name, ENT_COMPAT, get_option('blog_charset') ) . "]]></category>\n"; |
| | 320 | } |