X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/76aea3697c6043c1613370f172395b4f65ee71f0..refs/tags/wordpress-3.5.1:/wp-admin/includes/template.php
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index e132733e..788a4bd5 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -1,252 +1,199 @@
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 = "
+
' . $title . '
+
' . apply_filters('editable_slug', $post->post_name) . '
+
' . $post->post_author . '
+
+
' . esc_html( $post->ping_status ) . '
+
' . esc_html( $post->post_status ) . '
+
' . mysql2date( 'd', $post->post_date, false ) . '
+
' . mysql2date( 'm', $post->post_date, false ) . '
+
' . mysql2date( 'Y', $post->post_date, false ) . '
+
' . mysql2date( 'H', $post->post_date, false ) . '
+
' . mysql2date( 'i', $post->post_date, false ) . '
+
' . mysql2date( 's', $post->post_date, false ) . '
+
' . esc_html( $post->post_password ) . '
';
+
+ if ( $post_type_object->hierarchical )
+ echo '
' . $post->post_parent . '
';
+
+ if ( $post->post_type == 'page' )
+ echo '
' . esc_html( get_post_meta( $post->ID, '_wp_page_template', true ) ) . '
';
+
+ if ( post_type_supports( $post->post_type, 'page-attributes' ) )
+ echo '';
+
+ $taxonomy_names = get_object_taxonomies( $post->post_type );
+ foreach ( $taxonomy_names as $taxonomy_name) {
+ $taxonomy = get_taxonomy( $taxonomy_name );
+
+ if ( $taxonomy->hierarchical && $taxonomy->show_ui ) {
+ echo '
'
+ . implode( ',', wp_get_object_terms( $post->ID, $taxonomy_name, array( 'fields' => 'ids' ) ) ) . '
';
+ } elseif ( $taxonomy->show_ui ) {
+ echo '
'
+ . esc_html( str_replace( ',', ', ', get_terms_to_edit( $post->ID, $taxonomy_name ) ) ) . '
';
+ }
+ }
- return $out;
-}
+ if ( !$post_type_object->hierarchical )
+ echo '
' . (is_sticky($post->ID) ? 'sticky' : '') . '
';
-// Outputs appropriate rows for the Nth page of the Tag Management screen,
-// assuming M tags displayed at a time on the page
-// Returns the number of tags displayed
-function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
+ if ( post_type_supports( $post->post_type, 'post-formats' ) )
+ echo '
' . esc_html( get_post_format( $post->ID ) ) . '
';
- // Get a page worth of tags
- $start = ($page - 1) * $pagesize;
+ echo '
';
+}
- $args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0);
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since 2.7.0
+ *
+ * @param unknown_type $position
+ * @param unknown_type $checkbox
+ * @param unknown_type $mode
+ */
+function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) {
+ // allow plugin to replace the popup content
+ $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) );
- if ( !empty( $searchterms ) ) {
- $args['search'] = $searchterms;
+ if ( ! empty($content) ) {
+ echo $content;
+ return;
}
- $tags = get_terms( 'post_tag', $args );
-
- // convert it to table rows
- $out = '';
- $class = '';
- $count = 0;
- foreach( $tags as $tag )
- $out .= _tag_row( $tag, ++$count % 2 ? ' class="alternate"' : '' );
-
- // filter and send to screen
- $out = apply_filters('tag_rows', $out);
- echo $out;
- return $count;
-}
-
-// define the columns to display, the syntax is 'internal name' => 'display name'
-function wp_manage_posts_columns() {
- $posts_columns = array();
- $posts_columns['cb'] = '