Index: /trunk/wp-admin/edit-form-advanced.php
===================================================================
--- /trunk/wp-admin/edit-form-advanced.php (revision 7668)
+++ /trunk/wp-admin/edit-form-advanced.php (revision 7669)
@@ -1,3 +1,3 @@
-" tabindex="3" />
0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
-
+
@@ -234,13 +234,13 @@
+
+
-
-
Index: /trunk/wp-admin/includes/template.php
===================================================================
--- /trunk/wp-admin/includes/template.php (revision 7668)
+++ /trunk/wp-admin/includes/template.php (revision 7669)
@@ -176,7 +176,8 @@
}
-function write_nested_categories( $categories ) {
+function write_nested_categories( $categories, $popular_ids = array() ) {
foreach ( $categories as $category ) {
- echo "\n", '';
+ $class = in_array( $category['cat_ID'], $popular_ids ) ? ' class="popular-category"' : '';
+ echo "\n", "", '';
if ( $category['children'] ) {
@@ -189,6 +190,6 @@
}
-function dropdown_categories( $default = 0, $parent = 0 ) {
- write_nested_categories( get_nested_categories( $default, $parent ) );
+function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
+ write_nested_categories( get_nested_categories( $default, $parent ), $popular_ids );
}
@@ -196,9 +197,11 @@
$categories = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number ) );
+ $popular_ids = array();
foreach ( (array) $categories as $category ) {
+ $popular_ids[] = $category->term_id;
$id = "popular-category-$category->term_id";
?>
-
+