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

git-svn-id: https://develop.svn.wordpress.org/trunk@11158 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-05-02 18:43:04 +00:00
parent 5bac670114
commit d4fc4496fd
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;
}
//