| 181 | | $class = ('alternate' == $class ) ? '' : 'alternate'; |
| 182 | | ?> |
| 183 | | <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'> |
| 184 | | <th scope="row" style="text-align: center"><?php echo $post->ID; ?></th> |
| 185 | | <td> |
| 186 | | <?php echo $pad; ?><?php the_title() ?> |
| 187 | | </td> |
| 188 | | <td><?php the_author() ?></td> |
| 189 | | <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $post->post_modified ); ?></td> |
| 190 | | <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e( 'View' ); ?></a></td> |
| 191 | | <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td> |
| 192 | | <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&post=$id", 'delete-page_' . $id ) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . js_escape(sprintf( __("You are about to delete the '%s' page.\n'OK' to delete, 'Cancel' to stop." ), get_the_title() ) ) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td> |
| 193 | | </tr> |
| 195 | | <?php |
| 196 | | if ( $hierarchy ) page_rows( $id, $level + 1, $pages ); |
| | 183 | echo '<tr id="page-' . $id . '" class="' . $class . '">'; |
| | 184 | |
| | 185 | foreach($page_columns as $column_name=>$column_display_name) { |
| | 186 | |
| | 187 | switch($column_name) { |
| | 188 | |
| | 189 | case 'id': |
| | 190 | ?> |
| | 191 | <th scope="row" style="text-align: center"><?php echo $post->ID; ?></th> |
| | 192 | <?php |
| | 193 | break; |
| | 194 | |
| | 195 | case 'title': |
| | 196 | ?> |
| | 197 | <td> |
| | 198 | <?php echo $pad; ?><?php the_title() ?> |
| | 199 | </td> |
| | 200 | <?php |
| | 201 | break; |
| | 202 | |
| | 203 | case 'owner': |
| | 204 | ?> |
| | 205 | <td><?php the_author() ?></td> |
| | 206 | <?php |
| | 207 | break; |
| | 208 | |
| | 209 | case 'updated': |
| | 210 | ?> |
| | 211 | <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $post->post_modified ); ?></td> |
| | 212 | <?php |
| | 213 | break; |
| | 214 | |
| | 215 | case 'control_view': |
| | 216 | ?> |
| | 217 | <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td> |
| | 218 | <?php |
| | 219 | break; |
| | 220 | |
| | 221 | case 'control_edit': |
| | 222 | ?> |
| | 223 | <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td> |
| | 224 | <?php |
| | 225 | break; |
| | 226 | |
| | 227 | case 'control_delete': |
| | 228 | ?> |
| | 229 | <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&post=$id", 'delete-page_' . $id ) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . js_escape(sprintf( __("You are about to delete the '%s' page.\n'OK' to delete, 'Cancel' to stop." ), get_the_title() ) ) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td> |
| | 230 | <?php |
| | 231 | break; |
| | 232 | |
| | 233 | default: |
| | 234 | ?> |
| | 235 | <td><?php do_action('manage_pages_custom_column', $column_name, $id); ?></td> |
| | 236 | <?php |
| | 237 | break; |
| | 238 | } |
| | 239 | } |
| | 240 | echo '</tr>'; |
| | 241 | |
| | 242 | if($hierarchy) page_rows( $page_columns, $id, $level + 1, $pages ); |