X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/76aea3697c6043c1613370f172395b4f65ee71f0..ceb5a929e00123b4e224977c6b5a149f6431b250:/wp-admin/includes/template.php diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index e132733e..07663826 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1,252 +1,242 @@ 0); - if ( !empty($_GET['s']) ) - $args['search'] = $_GET['s']; - $categories = get_categories( $args ); - } - - if ( !$categories ) - return false; - - $children = _get_term_hierarchy('category'); - - $start = ($page - 1) * $per_page; - $end = $start + $per_page; - $i = -1; - ob_start(); - foreach ( $categories as $category ) { - if ( $count >= $end ) - break; - - $i++; - - if ( $category->parent != $parent ) - continue; - - // 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; - if ( !$my_parent->parent ) - break; - $my_parent = $my_parent->parent; - } - $num_parents = count($my_parents); - while( $my_parent = array_pop($my_parents) ) { - echo "\t" . _cat_row( $my_parent, $level - $num_parents ); - $num_parents--; - } - } - - if ( $count >= $start ) - echo "\t" . _cat_row( $category, $level ); - - unset($categories[$i]); // Prune the working set - $count++; - - if ( isset($children[$category->term_id]) ) - _cat_rows( $categories, $count, $category->term_id, $level + 1, $page, $per_page ); - - } - - $output = ob_get_contents(); - ob_end_clean(); - - $output = apply_filters('cat_rows', $output); - - echo $output; -} - -function _cat_row( $category, $level, $name_override = false ) { - global $class; - - $category = get_category( $category ); - - $pad = str_repeat( '— ', $level ); - $name = ( $name_override ? $name_override : $pad . ' ' . $category->name ); - if ( current_user_can( 'manage_categories' ) ) { - $edit = "name)) . "'>$name"; - } else { - $edit = $name; - } - - $class = " class='alternate'" == $class ? '' : " class='alternate'"; - - $category->count = number_format_i18n( $category->count ); - $posts_count = ( $category->count > 0 ) ? "$category->count" : $category->count; - $output = "
+ | + |
---|---|
+
+ + + + | + + + + ++ | ||||
- | $edit | -$user_object->first_name $user_object->last_name | -$role_name | "; - $r .= "\n\t\t"; - if ( $numposts > 0 ) { - $r .= ""; - $r .= $numposts; - $r .= ''; - } else { - $r .= 0; - } - $r .= " | \n\t|
comment_post_ID) ) { ?> | - -- | - - - -- | -comment_post_ID) ) { - $actions['approve'] = "" . __( 'Approve' ) . ' | '; - $actions['unapprove'] = "" . __( 'Unapprove' ) . ' | '; - - // we're looking at list of only approved or only unapproved comments - if ( 'moderated' == $comment_status ) { - $actions['approve'] = "" . __( 'Approve' ) . ' | '; - unset($actions['unapprove']); - } elseif ( 'approved' == $comment_status ) { - $actions['unapprove'] = "" . __( 'Unapprove' ) . ' | '; - unset($actions['approve']); - } - - $actions['spam'] = "" . __( 'Spam' ) . ' | '; - $actions['delete'] = "" . __('Delete') . ''; - $actions = apply_filters( 'comment_row_actions', $actions, $comment ); - foreach ( $actions as $action => $link ) - echo "$link"; - } - ?> - | -||
- | - | - | |||
"; - $r .= "\n\t\t"; - $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); - $r .= " | \n\t
-
- |
-- | - |
- - + | ||
+
+ 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
+
+
|