mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Allow queries by post type. Enable paging in Manage->Pages
git-svn-id: https://develop.svn.wordpress.org/trunk@3564 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+10
-24
@@ -19,13 +19,12 @@ require_once('admin-header.php');
|
||||
</form>
|
||||
|
||||
<?php
|
||||
wp('post_type=page&orderby=menu_order&what_to_show=posts&posts_per_page=15&posts_per_archive_page=-1');
|
||||
|
||||
$show_post_type = 'page';
|
||||
|
||||
if ( isset($_GET['s']) )
|
||||
wp();
|
||||
if ( $_GET['s'] )
|
||||
$all = false;
|
||||
else
|
||||
$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'page'");
|
||||
$all = true;
|
||||
|
||||
if ($posts) {
|
||||
?>
|
||||
@@ -40,30 +39,17 @@ if ($posts) {
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ( isset($_GET['s']) ) {
|
||||
foreach ( $posts as $post ) :
|
||||
$class = ('alternate' != $class) ? 'alternate' : ''; ?>
|
||||
<tr id='page-<?php echo $post->ID; ?>' class='<?php echo $class; ?>'>
|
||||
<th scope="row"><?php echo $post->ID; ?></th>
|
||||
<td>
|
||||
<?php echo $pad; ?><?php the_title() ?>
|
||||
</td>
|
||||
<td><?php the_author() ?></td>
|
||||
<td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
|
||||
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
|
||||
<td><?php if ( current_user_can('edit_page', $post->ID) ) { echo "<a href='page.php?action=edit&post=$post->ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
|
||||
<td><?php if ( current_user_can('delete_page', $post->ID) ) { echo "<a href='page.php?action=delete&post=$post->ID' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the "%s" page.\\n"OK" to delete, "Cancel" to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
} else {
|
||||
page_rows();
|
||||
}
|
||||
page_rows(0, 0, $posts, $all);
|
||||
?>
|
||||
</table>
|
||||
|
||||
<div id="ajax-response"></div>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php next_posts_link(__('« Previous Entries')) ?></div>
|
||||
<div class="alignright"><?php previous_posts_link(__('Next Entries »')) ?></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user