2008-08-16 09:27:34 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Edit posts rows table for inclusion in administration panels.
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Administration
|
|
|
|
*/
|
|
|
|
|
|
|
|
if ( ! defined('ABSPATH') ) die();
|
|
|
|
?>
|
2007-08-24 00:19:53 +02:00
|
|
|
<table class="widefat">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
|
2008-09-11 03:46:30 +02:00
|
|
|
<?php
|
|
|
|
$posts_columns = wp_manage_posts_columns();
|
|
|
|
$hidden = (array) get_user_option( 'manage-post-columns-hidden' );
|
|
|
|
foreach ( $posts_columns as $post_column_key => $column_display_name ) {
|
2008-03-15 07:14:03 +01:00
|
|
|
if ( 'cb' === $post_column_key )
|
|
|
|
$class = ' class="check-column"';
|
|
|
|
elseif ( 'comments' === $post_column_key )
|
2008-09-11 03:46:30 +02:00
|
|
|
$class = ' class="manage-column column-comments num"';
|
|
|
|
elseif ( 'modified' === $post_column_key )
|
|
|
|
$class = ' class="manage-column column-date"';
|
2008-03-15 07:14:03 +01:00
|
|
|
else
|
2008-09-11 03:46:30 +02:00
|
|
|
$class = " class=\"manage-column column-$post_column_key\"";
|
|
|
|
|
|
|
|
$style = '';
|
|
|
|
if ( in_array($post_column_key, $hidden) )
|
|
|
|
$style = ' style="display:none;"';
|
2008-03-15 07:14:03 +01:00
|
|
|
?>
|
2008-09-11 03:46:30 +02:00
|
|
|
<th scope="col"<?php echo "id=\"$post_column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th>
|
2007-08-24 00:19:53 +02:00
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2008-02-27 01:46:27 +01:00
|
|
|
<tbody>
|
2008-09-11 00:47:03 +02:00
|
|
|
|
|
|
|
<?php inline_edit_row( 'post' ) ?>
|
|
|
|
|
2007-08-24 00:19:53 +02:00
|
|
|
<?php
|
|
|
|
if ( have_posts() ) {
|
2008-08-25 22:21:27 +02:00
|
|
|
post_rows();
|
2007-08-24 00:19:53 +02:00
|
|
|
} else {
|
|
|
|
?>
|
2008-08-25 22:21:27 +02:00
|
|
|
<tr>
|
2007-09-04 01:32:58 +02:00
|
|
|
<td colspan="8"><?php _e('No posts found.') ?></td>
|
|
|
|
</tr>
|
2007-08-24 00:19:53 +02:00
|
|
|
<?php
|
|
|
|
} // end if ( have_posts() )
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|