Ticket #5790: delete_confirm_new.diff
| File delete_confirm_new.diff, 10.6 KB (added by ffemtcj, 5 years ago) |
|---|
-
wp-admin/edit-comments.php
158 158 } // end foreach 159 159 ?></tbody> 160 160 </table> 161 <p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to delete")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to delete %s comments permanently \n 'Cancel' to stop, 'OK' to delete.")), "' + numchecked + '"); ?>')" />161 <p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to delete")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to delete %s comments permanently \n Press 'OK' to delete or 'Cancel' to stop.")), "' + numchecked + '"); ?>')" /> 162 162 <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to mark as spam")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to mark %s comments as spam \n 'Cancel' to stop, 'OK' to mark as spam.")), "' + numchecked + '"); ?>')" /></p> 163 163 </form> 164 164 <div id="ajax-response"></div> -
wp-admin/edit-form-advanced.php
152 152 } 153 153 154 154 if ( ('edit' == $action) && current_user_can('delete_post', $post_ID) ) 155 echo "<a href='" . wp_nonce_url("post.php?action=delete&post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete post') . "</a>";155 echo "<a href='" . wp_nonce_url("post.php?action=delete&post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n Press 'OK' to delete or 'Cancel' to stop.") : __("You are about to delete this post '%s'\n Press 'OK' to delete or 'Cancel' to stop."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete post') . "</a>"; 156 156 ?> 157 157 <?php if ($post_ID): ?> 158 158 <br /> -
wp-admin/edit-form-comment.php
75 75 76 76 <tr> 77 77 <th scope="row" valign="top"> </th> 78 <td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { document.forms.post._wpnonce.value = '" . wp_create_nonce( 'delete-comment_' . $comment->comment_ID ) . "'; return true; } return false;\""; ?> />78 <td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n Press 'OK' to delete or 'Cancel' to stop.")) . "') ) { document.forms.post._wpnonce.value = '" . wp_create_nonce( 'delete-comment_' . $comment->comment_ID ) . "'; return true; } return false;\""; ?> /> 79 79 <input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" /> 80 80 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> 81 81 <input type="hidden" name="noredir" value="1" /> -
wp-admin/edit-page-form.php
117 117 } 118 118 119 119 if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) ) 120 echo "<a href='" . wp_nonce_url("page.php?action=delete&post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete page') . "</a>";120 echo "<a href='" . wp_nonce_url("page.php?action=delete&post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n Press 'OK' to delete or 'Cancel' to stop.") : __("You are about to delete this page '%s'\n Press 'OK' to delete or 'Cancel' to stop."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete page') . "</a>"; 121 121 ?> 122 122 <?php if ($post_ID): ?> 123 123 <br /> -
wp-admin/edit-post-rows.php
94 94 95 95 case 'control_delete': 96 96 ?> 97 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "' class='delete:the-list:post-$post->ID delete'>" . __('Delete') . "</a>"; } ?></td>97 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n Press 'OK' to delete or 'Cancel' to stop.") : __("You are about to delete this post '%s'\n Press 'OK' to delete or 'Cancel' to stop."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; } ?></td> 98 98 <?php 99 99 break; 100 100 -
wp-admin/includes/template.php
42 42 $default_cat_id = (int) get_option( 'default_category' ); 43 43 44 44 if ( $category->term_id != $default_cat_id ) 45 $edit .= "<td ><a href='" . wp_nonce_url( "categories.php?action=delete&cat_ID=$category->term_id", 'delete-category_' . $category->term_id ) . "' class='delete:the-list:cat-$category->term_id delete'>".__( 'Delete' )."</a>";45 $edit .= "<td align='center'><a href='" . wp_nonce_url( "categories.php?action=delete&cat_ID=$category->term_id", 'delete-category_' . $category->term_id ) . "' onclick=\"if ( confirm('" . js_escape(sprintf( __("You are about to delete this post '%s'\n Press 'OK' to delete or 'Cancel' to stop."), $category->name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 46 46 else 47 47 $edit .= "<td style='text-align:center'>".__( "Default" ); 48 48 } else … … 350 350 <td><?php if ( '0000-00-00 00:00:00' ==$page->post_modified ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $page->post_modified ); ?></td> 351 351 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="view"><?php _e( 'View' ); ?></a></td> 352 352 <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td> 353 <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&post=$id", 'delete-page_' . $id ) . "' class='delete:the-list:page-$id delete'>" . __( 'Delete') . "</a>"; } ?></td>353 <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&post=$id", 'delete-page_' . $id ) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n Press 'OK' to delete or 'Cancel' to stop.") : __("You are about to delete this page '%s'\n Press 'OK' to delete or 'Cancel' to stop."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; } ?></td> 354 354 </tr> 355 355 356 356 <?php -
wp-admin/link-manager.php
164 164 break; 165 165 case 'action': 166 166 echo "<td><a href='link.php?link_id=$link->link_id&action=edit' class='edit'>" . __('Edit') . '</a></td>'; 167 echo "<td ><a href='" . wp_nonce_url('link.php?link_id='.$link->link_id.'&action=delete', 'delete-bookmark_' . $link->link_id ) . "' class='delete:the-list:link-$link->link_id delete'>" . __('Delete') . '</a></td>';167 echo "<td align='center'><a href='" . wp_nonce_url('link.php?link_id='.$link->link_id.'&action=delete', 'delete-bookmark_' . $link->link_id ) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this link '%s'\n Press 'OK' to delete or 'Cancel' to stop.") : __("You are about to delete this link '%s'\n Press 'OK' to delete or 'Cancel' to stop."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete') . '</a></td>'; 168 168 break; 169 169 default: 170 170 ?> … … 183 183 184 184 <div id="ajax-response"></div> 185 185 186 <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Links »') ?>" onclick="return confirm('<?php echo js_escape(__("You are about to delete these links permanently.\n 'Cancel' to stop, 'OK' to delete.")); ?>')" /></p>186 <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Links »') ?>" onclick="return confirm('<?php echo js_escape(__("You are about to delete these links permanently.\nPress 'OK' to delete or 'Cancel' to stop.")); ?>')" /></p> 187 187 </form> 188 188 189 189 <?php } ?>
