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:
Andrew Ozz
2008-11-04 23:15:59 +00:00
parent c6bed34239
commit 2dde47a9f2
8 changed files with 114 additions and 37 deletions
+23
View File
@@ -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 ) )