root/trunk/wp-admin/edit-post-rows.php

Revision 8729, 0.8 kB (checked in by ryan, 3 days ago)

Move post row generation to functions in prep for some AJAX work. see #7552

  • Property svn:eol-style set to native
Line 
1 <?php
2 /**
3  * Edit posts rows table for inclusion in administration panels.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 if ( ! defined('ABSPATH') ) die();
10 ?>
11 <table class="widefat">
12     <thead>
13     <tr>
14
15 <?php $posts_columns = wp_manage_posts_columns(); ?>
16 <?php foreach($posts_columns as $post_column_key => $column_display_name) {
17     if ( 'cb' === $post_column_key )
18         $class = ' class="check-column"';
19     elseif ( 'comments' === $post_column_key )
20         $class = ' class="num"';
21     else
22         $class = '';
23 ?>
24     <th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th>
25 <?php } ?>
26
27     </tr>
28     </thead>
29     <tbody>
30 <?php
31 if ( have_posts() ) {
32     post_rows();
33 } else {
34 ?>
35   <tr>
36     <td colspan="8"><?php _e('No posts found.') ?></td>
37   </tr>
38 <?php
39 } // end if ( have_posts() )
40 ?>
41     </tbody>
42 </table>
43
Note: See TracBrowser for help on using the browser.