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:
parent
5bac670114
commit
d4fc4496fd
|
@ -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;
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue