Changeset 3303 for trunk/wp-admin/edit-pages.php
- Timestamp:
- 12/13/2005 07:19:56 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-pages.php
r2832 r3303 10 10 <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'); ?> »</a></p> 11 11 12 <form name="searchform" action="" method="get"> 13 <fieldset> 14 <legend><?php _e('Search Pages…') ?></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 12 20 <?php 13 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'"); 21 22 $show_post_type = 'page'; 23 24 if ( isset($_GET['s']) ) 25 wp(); 26 else 27 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'"); 14 28 15 29 if ($posts) { … … 25 39 <th scope="col"></th> 26 40 </tr> 27 <?php page_rows(); ?> 41 <?php 42 if ( isset($_GET['s']) ) { 43 foreach ( $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&post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td> 54 <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&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> 55 </tr> 56 <?php 57 endforeach; 58 } else { 59 page_rows(); 60 } 61 ?> 28 62 </table> 29 63
Note: See TracChangeset
for help on using the changeset viewer.