WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-pages.php

    r4258 r3422  
    33$title = __('Pages');
    44$parent_file = 'edit.php';
    5 wp_enqueue_script( 'listman' );
     5$list_js = true;
    66require_once('admin-header.php');
    77?>
     
    99<div class="wrap">
    1010<h2><?php _e('Page Management'); ?></h2>
    11 <p><?php _e('Pages are like posts except they live outside of the normal blog chronology and can be hierarchical. You can use pages to organize and manage any amount of content.'); ?> <a href="page-new.php"><?php _e('Create a new page &raquo;'); ?></a></p>
     11<p><?php _e('Pages are like posts except they live outside of the normal blog chronology and can be hierarchical. You can use pages to organize and manage any amount of content.'); ?> <a href="page-new.php"><?php _e('Create a new page'); ?> &raquo;</a></p>
    1212
    1313<form name="searchform" action="" method="get">
     
    2020
    2121<?php
    22 wp('post_type=page&orderby=menu_order&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1');
    2322
    24 if ( $_GET['s'] )
    25     $all = false;
     23$show_post_type = 'page';
     24
     25if ( isset($_GET['s']) )
     26    wp();
    2627else
    27     $all = true;
     28    $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'");
    2829
    2930if ($posts) {
    3031?>
    31 <table class="widefat">
    32   <thead>
    33   <tr>
    34     <th scope="col" style="text-align: center"><?php _e('ID') ?></th>
    35     <th scope="col"><?php _e('Title') ?></th>
     32<table id="the-list-x" width="100%" cellpadding="3" cellspacing="3">
     33  <tr>
     34    <th scope="col"><?php _e('ID') ?></th>
     35    <th scope="col"><?php _e('Title') ?></th>
    3636    <th scope="col"><?php _e('Owner') ?></th>
    3737    <th scope="col"><?php _e('Updated') ?></th>
    38     <th scope="col" colspan="3" style="text-align: center"><?php _e('Action'); ?></th>
     38    <th scope="col"></th>
     39    <th scope="col"></th>
     40    <th scope="col"></th>
     41  </tr>
     42<?php
     43if ( isset($_GET['s']) ) {
     44foreach ( $posts as $post ) :
     45    $class = ('alternate' != $class) ? 'alternate' : ''; ?>
     46  <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
     47    <th scope="row"><?php echo $post->ID; ?></th>
     48    <td>
     49      <?php echo $pad; ?><?php the_title() ?>
     50    </td>
     51    <td><?php the_author() ?></td>
     52    <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
     53    <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
     54    <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     55    <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
    3956  </tr>
    40   </thead>
    41   <tbody id="the-list">
    4257<?php
    43 page_rows(0, 0, $posts, $all);
     58endforeach;
     59} else {
     60    page_rows();
     61}
    4462?>
    45   </tbody>
    46 </table>
     63</table>
    4764
    4865<div id="ajax-response"></div>
     
    5673?>
    5774
    58 <h3><a href="page-new.php"><?php _e('Create New Page &raquo;'); ?></a></h3>
     75<h3><a href="page-new.php"><?php _e('Create New Page'); ?> &raquo;</a></h3>
    5976
    6077</div>
Note: See TracChangeset for help on using the changeset viewer.