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:
parent
175c9730fb
commit
161b628ba9
|
@ -585,7 +585,8 @@ case 'get-tagcloud' :
|
||||||
$tags[ $key ]->id = $tag->term_id;
|
$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) )
|
if ( empty($return) )
|
||||||
die('0');
|
die('0');
|
||||||
|
|
|
@ -599,6 +599,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
|
||||||
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0,
|
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0,
|
||||||
'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
|
'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
|
||||||
'topic_count_text_callback' => 'default_topic_count_text',
|
'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'] ) ) {
|
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;
|
break;
|
||||||
endswitch;
|
endswitch;
|
||||||
|
|
||||||
|
if ( $filter )
|
||||||
return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args );
|
return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args );
|
||||||
|
else
|
||||||
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue