months_dropdown( $post_type );
+ $this->months_dropdown( $post_type_object->name );
- if ( is_object_in_taxonomy( $post_type, 'category' ) ) {
+ if ( is_object_in_taxonomy( $post_type_object->name, 'category' ) ) {
$dropdown_options = array(
'show_option_all' => __( 'View all categories' ),
'hide_empty' => 0,
@@ -281,7 +277,7 @@ class WP_Posts_List_Table extends WP_List_Table {
$post_status = !empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all';
if ( post_type_supports( $post_type, 'comments' ) && !in_array( $post_status, array( 'pending', 'draft', 'future' ) ) )
- $posts_columns['comments'] = '
';
$posts_columns['date'] = __( 'Date' );
@@ -364,7 +360,7 @@ class WP_Posts_List_Table extends WP_List_Table {
if ( $page->post_parent == $page->ID ) {
$page->post_parent = 0;
$wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) );
- clean_page_cache( $page->ID );
+ clean_post_cache( $page );
}
if ( 0 == $page->post_parent )
@@ -463,23 +459,22 @@ class WP_Posts_List_Table extends WP_List_Table {
}
function single_row( $a_post, $level = 0 ) {
- global $post, $current_screen, $mode;
- static $rowclass;
+ global $post, $mode;
+ static $alternate;
$global_post = $post;
$post = $a_post;
setup_postdata( $post );
- $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
- $post_owner = ( get_current_user_id() == $post->post_author ? 'self' : 'other' );
$edit_link = get_edit_post_link( $post->ID );
$title = _draft_or_post_title();
$post_type_object = get_post_type_object( $post->post_type );
$can_edit_post = current_user_can( $post_type_object->cap->edit_post, $post->ID );
- $post_format = get_post_format( $post->ID );
- $post_format_class = ( $post_format && !is_wp_error($post_format) ) ? 'format-' . sanitize_html_class( $post_format ) : 'format-default';
+
+ $alternate = 'alternate' == $alternate ? '' : 'alternate';
+ $classes = $alternate . ' iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' );
?>
-
get_column_info();
@@ -532,9 +527,8 @@ class WP_Posts_List_Table extends WP_List_Table {
?>
>post_status != 'trash' ) { ?>
ID ) )
the_excerpt();
- }
}
$actions = array();
@@ -550,11 +544,13 @@ class WP_Posts_List_Table extends WP_List_Table {
if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS )
$actions['delete'] = "" . __( 'Delete Permanently' ) . "";
}
- if ( in_array( $post->post_status, array( 'pending', 'draft' ) ) ) {
- if ( $can_edit_post )
- $actions['view'] = '' . __( 'Preview' ) . '';
- } elseif ( 'trash' != $post->post_status ) {
- $actions['view'] = '' . __( 'View' ) . '';
+ if ( $post_type_object->public ) {
+ if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {
+ if ( $can_edit_post )
+ $actions['view'] = '' . __( 'Preview' ) . '';
+ } elseif ( 'trash' != $post->post_status ) {
+ $actions['view'] = '' . __( 'View' ) . '';
+ }
}
$actions = apply_filters( is_post_type_hierarchical( $post->post_type ) ? 'page_row_actions' : 'post_row_actions', $actions, $post );
@@ -612,7 +608,8 @@ class WP_Posts_List_Table extends WP_List_Table {
esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'category', 'display' ) )
);
}
- echo join( ', ', $out );
+ /* translators: used between list items, there is a space after the comma */
+ echo join( __( ', ' ), $out );
} else {
_e( 'Uncategorized' );
}
@@ -632,7 +629,8 @@ class WP_Posts_List_Table extends WP_List_Table {
esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'tag', 'display' ) )
);
}
- echo join( ', ', $out );
+ /* translators: used between list items, there is a space after the comma */
+ echo join( __( ', ' ), $out );
} else {
_e( 'No Tags' );
}
@@ -837,14 +835,23 @@ class WP_Posts_List_Table extends WP_List_Table {
post_type, 'author' ) && $bulk )
echo $authors_dropdown;
- ?>
- hierarchical ) : ?>
+ if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
+ if ( $post_type_object->hierarchical ) :
+ ?>
- post_type, 'page-attributes' ) ) :
+
-
+ post_type ) :
+ ?>
hierarchical ?>
+ endif; // page post_type
+ endif; // page-attributes
+ ?>
-
+ cap->assign_terms ) ) : ?>
+
@@ -979,6 +993,31 @@ class WP_Posts_List_Table extends WP_List_Table {
+ post_type, 'post-formats' ) && current_theme_supports( 'post-formats' ) ) :
+ $post_formats = get_theme_support( 'post-formats' );
+ if ( isset( $post_formats[0] ) && is_array( $post_formats[0] ) ) :
+ $all_post_formats = get_post_format_strings();
+ unset( $all_post_formats['standard'] ); ?>
+
+
+
+
+
+
-
+
-
+
's' ) );
} ?>
+
|