X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/76aea3697c6043c1613370f172395b4f65ee71f0..refs/tags/wordpress-2.7.1:/wp-admin/includes/template.php diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index e132733e..2566a616 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1,15 +1,43 @@ 0); @@ -39,7 +67,6 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p // If the page starts in a subtree, print the parents. if ( $count == $start && $category->parent > 0 ) { $my_parents = array(); - $my_parent = $category->parent; while ( $my_parent) { $my_parent = get_category($my_parent); $my_parents[] = $my_parent; @@ -57,7 +84,7 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p if ( $count >= $start ) echo "\t" . _cat_row( $category, $level ); - unset($categories[$i]); // Prune the working set + unset($categories[$i]); // Prune the working set $count++; if ( isset($children[$category->term_id]) ) @@ -68,83 +95,284 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p $output = ob_get_contents(); ob_end_clean(); - $output = apply_filters('cat_rows', $output); - echo $output; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $category + * @param unknown_type $level + * @param unknown_type $name_override + * @return unknown + */ function _cat_row( $category, $level, $name_override = false ) { - global $class; + static $row_class = ''; - $category = get_category( $category ); + $category = get_category( $category, OBJECT, 'display' ); + $default_cat_id = (int) get_option( 'default_category' ); $pad = str_repeat( '— ', $level ); $name = ( $name_override ? $name_override : $pad . ' ' . $category->name ); + $edit_link = "categories.php?action=edit&cat_ID=$category->term_id"; if ( current_user_can( 'manage_categories' ) ) { - $edit = "name)) . "'>$name"; + $edit = "name)) . "'>" . attribute_escape( $name ) . ''; + $actions = array(); + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + if ( $default_cat_id != $category->term_id ) + $actions['delete'] = "term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $action_count = count($actions); + $i = 0; + $edit .= '
+ + + + + + + +
+ + + + + + + + + +
- - | - - ID ) ) : ?> - comment_author_email) ): ?> - | - - - -
+ + +
' . __('The same modules can be expanded and collapsed by clicking once on their title bar and also completely hidden from the Screen Options tab.') . '