mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 23:27:04 +00:00
Add "Choose from popular tags" to the tags postbox
git-svn-id: https://develop.svn.wordpress.org/trunk@9518 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -422,6 +422,29 @@ case 'add-tag' : // From Manage->Tags
|
||||
) );
|
||||
$x->send();
|
||||
break;
|
||||
case 'get-tagcloud' :
|
||||
if ( !current_user_can( 'manage_categories' ) )
|
||||
die('-1');
|
||||
|
||||
$tags = get_tags( array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC' ) );
|
||||
|
||||
if ( empty( $tags ) )
|
||||
die('0');
|
||||
|
||||
foreach ( $tags as $key => $tag ) {
|
||||
$tags[ $key ]->link = '#';
|
||||
$tags[ $key ]->id = $tag->term_id;
|
||||
}
|
||||
|
||||
$return = wp_generate_tag_cloud( $tags );
|
||||
|
||||
if ( empty($return) )
|
||||
die('0');
|
||||
|
||||
echo $return;
|
||||
|
||||
exit;
|
||||
break;
|
||||
case 'add-comment' :
|
||||
check_ajax_referer( $action );
|
||||
if ( !current_user_can( 'edit_post', $id ) )
|
||||
|
||||
Reference in New Issue
Block a user