Make WordPress Core


Ignore:
Timestamp:
12/13/2005 07:19:56 PM (20 years ago)
Author:
ryan
Message:

Attachment enhancements from skeltoac. fixes #2074

File:
1 edited

Legend:

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

    r2832 r3303  
    1010<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>
    1111
     12<form name="searchform" action="" method="get">
     13  <fieldset>
     14  <legend><?php _e('Search Pages&hellip;') ?></legend>
     15  <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
     16  <input type="submit" name="submit" value="<?php _e('Search') ?>"  />
     17  </fieldset>
     18</form>
     19
    1220<?php
    13 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'");
     21
     22$show_post_type = 'page';
     23
     24if ( isset($_GET['s']) )
     25    wp();
     26else
     27    $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'");
    1428
    1529if ($posts) {
     
    2539    <th scope="col"></th>
    2640  </tr>
    27 <?php page_rows(); ?>
     41<?php
     42if ( isset($_GET['s']) ) {
     43foreach ( $posts as $post ) :
     44    $class = ('alternate' != $class) ? 'alternate' : ''; ?>
     45  <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
     46    <th scope="row"><?php echo $post->ID; ?></th>
     47    <td>
     48      <?php echo $pad; ?><?php the_title() ?>
     49    </td>
     50    <td><?php the_author() ?></td>
     51    <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
     52    <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
     53    <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     54    <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>
     55  </tr>
     56<?php
     57endforeach;
     58} else {
     59    page_rows();
     60}
     61?>
    2862</table>
    2963
Note: See TracChangeset for help on using the changeset viewer.