months_dropdown( $post_type );
if ( is_object_in_taxonomy( $post_type, 'category' ) ) {
$dropdown_options = array(
'show_option_all' => __( 'View all categories' ),
'hide_empty' => 0,
'hierarchical' => 1,
'show_count' => 0,
'orderby' => 'name',
'selected' => $cat
);
wp_dropdown_categories( $dropdown_options );
}
do_action( 'restrict_manage_posts' );
submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false );
?>
is_trash && current_user_can( $post_type_object->cap->edit_others_posts ) ) {
submit_button( __( 'Empty Trash' ), 'button-secondary apply', 'delete_all', false );
}
}
function current_action() {
if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
return 'delete_all';
return parent::current_action();
}
function pagination( $which ) {
global $post_type_object, $mode;
parent::pagination( $which );
if ( 'top' == $which && !$post_type_object->hierarchical )
$this->view_switcher( $mode );
}
function get_table_classes() {
global $post_type_object;
return array( 'widefat', 'fixed', $post_type_object->hierarchical ? 'pages' : 'posts' );
}
function get_columns() {
$screen = $this->_screen;
if ( empty( $screen ) )
$post_type = 'post';
else
$post_type = $screen->post_type;
$posts_columns = array();
$posts_columns['cb'] = 'post_status ); ?> iedit' valign="top">
get_column_info();
foreach ( $columns as $column_name => $column_display_name ) {
$class = "class=\"$column_name column-$column_name\"";
$style = '';
if ( in_array( $column_name, $hidden ) )
$style = ' style="display:none;"';
$attributes = "$class$style";
switch ( $column_name ) {
case 'cb':
?>
|
hierarchical_display ) {
$attributes = 'class="post-title page-title column-title"' . $style;
if ( 0 == $level && (int) $post->post_parent > 0 ) {
//sent level 0 by accident, by default, or because we don't know the actual level
$find_main_page = (int) $post->post_parent;
while ( $find_main_page > 0 ) {
$parent = get_page( $find_main_page );
if ( is_null( $parent ) )
break;
$level++;
$find_main_page = (int) $parent->post_parent;
if ( !isset( $parent_name ) )
$parent_name = $parent->post_title;
}
}
$post->post_title = esc_html( $post->post_title );
$pad = str_repeat( '— ', $level );
?>
>post_status != 'trash' ) { ?>labels->parent_item_colon . ' ' . esc_html( $parent_name ) : ''; ?>
| >post_status != 'trash' ) { ?>
post_status ) {
$actions['edit'] = '' . __( 'Edit' ) . '';
$actions['inline hide-if-no-js'] = '' . __( 'Quick Edit' ) . '';
}
if ( current_user_can( $post_type_object->cap->delete_post, $post->ID ) ) {
if ( 'trash' == $post->post_status )
$actions['untrash'] = "ID ) ), 'untrash-' . $post->post_type . '_' . $post->ID ) . "'>" . __( 'Restore' ) . "";
elseif ( EMPTY_TRASH_DAYS )
$actions['trash'] = "" . __( 'Trash' ) . "";
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' ) . '';
}
$actions = apply_filters( $this->hierarchical_display ? 'page_row_actions' : 'post_row_actions', $actions, $post );
echo $this->row_actions( $actions );
get_inline_data( $post );
echo ' | ';
break;
case 'date':
if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
$t_time = $h_time = __( 'Unpublished' );
$time_diff = 0;
} else {
$t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
$m_time = $post->post_date;
$time = get_post_time( 'G', true, $post );
$time_diff = time() - $time;
if ( $time_diff > 0 && $time_diff < 24*60*60 )
$h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
else
$h_time = mysql2date( __( 'Y/m/d' ), $m_time );
}
echo '';
if ( 'excerpt' == $mode )
echo apply_filters( 'post_date_column_time', $t_time, $post, $column_name, $mode );
else
echo '' . apply_filters( 'post_date_column_time', $h_time, $post, $column_name, $mode ) . '';
echo ' ';
if ( 'publish' == $post->post_status ) {
_e( 'Published' );
} elseif ( 'future' == $post->post_status ) {
if ( $time_diff > 0 )
echo '' . __( 'Missed schedule' ) . '';
else
_e( 'Scheduled' );
} else {
_e( 'Last Modified' );
}
echo ' | ';
break;
case 'categories':
?>
>%s',
esc_url( add_query_arg( array( 'post_type' => $post->post_type, 'category_name' => $c->slug ), 'edit.php' ) ),
esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'category', 'display' ) )
);
}
echo join( ', ', $out );
} else {
_e( 'Uncategorized' );
}
?> |
>ID );
if ( !empty( $tags ) ) {
$out = array();
foreach ( $tags as $c ) {
$out[] = sprintf( '%s',
esc_url( add_query_arg( array( 'post_type' => $post->post_type, 'tag' => $c->slug ), 'edit.php' ) ),
esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'tag', 'display' ) )
);
}
echo join( ', ', $out );
} else {
_e( 'No Tags' );
}
?> |
>
comment_pending_count[$post->ID] ) ? $this->comment_pending_count[$post->ID] : 0;
$this->comments_bubble( $post->ID, $pending_comments );
?>
|
>%s',
esc_url( add_query_arg( array( 'post_type' => $post->post_type, 'author' => get_the_author_meta( 'ID' ) ), 'edit.php' )),
get_the_author()
);
?> |
>ID ); ?> |
_screen;
$post = get_default_post_to_edit( $screen->post_type );
$post_type_object = get_post_type_object( $screen->post_type );
$taxonomy_names = get_object_taxonomies( $screen->post_type );
$hierarchical_taxonomies = array();
$flat_taxonomies = array();
foreach ( $taxonomy_names as $taxonomy_name ) {
$taxonomy = get_taxonomy( $taxonomy_name );
if ( !$taxonomy->show_ui )
continue;
if ( $taxonomy->hierarchical )
$hierarchical_taxonomies[] = $taxonomy;
else
$flat_taxonomies[] = $taxonomy;
}
list( $columns, $hidden ) = $this->get_column_info();
$col_count = count( $columns ) - count( $hidden );
$m = ( isset( $mode ) && 'excerpt' == $mode ) ? 'excerpt' : 'list';
$can_publish = current_user_can( $post_type_object->cap->publish_posts );
$core_columns = array( 'cb' => true, 'date' => true, 'title' => true, 'categories' => true, 'tags' => true, 'comments' => true, 'author' => true );
?>