Fix edit and delete page buttons. Props wellsdjohn. fixes #2382
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
879bd88403
commit
b4166d8f13
|
@ -43,7 +43,7 @@ if ($posts) {
|
|||
if ( isset($_GET['s']) ) {
|
||||
foreach ( $posts as $post ) :
|
||||
$class = ('alternate' != $class) ? 'alternate' : ''; ?>
|
||||
<tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
|
||||
<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() ?>
|
||||
|
@ -51,8 +51,8 @@ foreach ( $posts as $post ) :
|
|||
<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_pages') ) { echo "<a href='post.php?action=edit&post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
|
||||
<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>
|
||||
<td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&post=$post->ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
|
||||
<td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.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;
|
||||
|
|
Loading…
Reference in New Issue