Turn off tag cloud filtering when requesting the cloud via AJAX. Props jhodgdon. fixes ##6593

git-svn-id: http://svn.automattic.com/wordpress/trunk@11158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-05-02 18:43:04 +00:00
parent 175c9730fb
commit 161b628ba9
2 changed files with 7 additions and 2 deletions

View File

@ -585,7 +585,8 @@ case 'get-tagcloud' :
$tags[ $key ]->id = $tag->term_id;
}
$return = wp_generate_tag_cloud( $tags );
// We need raw tag names here, so don't filter the output
$return = wp_generate_tag_cloud( $tags, array('filter' => 0) );
if ( empty($return) )
die('0');

View File

@ -599,6 +599,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0,
'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
'topic_count_text_callback' => 'default_topic_count_text',
'filter' => 1,
);
if ( !isset( $args['topic_count_text_callback'] ) && isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) {
@ -680,7 +681,10 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
break;
endswitch;
return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args );
if ( $filter )
return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args );
else
return $return;
}
//