Changeset 8682 for trunk/wp-admin/link-manager.php
- Timestamp:
- 08/20/2008 04:06:36 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/link-manager.php
r8645 r8682 11 11 12 12 // Handle bulk deletes 13 if ( isset($_GET[' deleteit']) && isset($_GET['linkcheck']) ) {13 if ( isset($_GET['action']) && isset($_GET['linkcheck']) ) { 14 14 check_admin_referer('bulk-bookmarks'); 15 15 16 16 if ( ! current_user_can('manage_links') ) 17 17 wp_die( __('You do not have sufficient permissions to edit the links for this blog.') ); 18 19 foreach ( (array) $_GET['linkcheck'] as $link_id) { 20 $link_id = (int) $link_id; 21 22 wp_delete_link($link_id); 18 19 if ( $_GET['action'] == 'delete' ) { 20 foreach ( (array) $_GET['linkcheck'] as $link_id) { 21 $link_id = (int) $link_id; 22 23 wp_delete_link($link_id); 24 } 25 26 $sendback = wp_get_referer(); 27 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 28 wp_redirect($sendback); 29 exit; 23 30 } 24 25 $sendback = wp_get_referer();26 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);27 wp_redirect($sendback);28 exit;29 31 } elseif ( !empty($_GET['_wp_http_referer']) ) { 30 32 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); … … 83 85 84 86 <form id="posts-filter" action="" method="get"> 85 <h2><?php printf( __( 'Manage Links (<a href="%s">add new</a>)' ), 'link-add.php' ); ?></h2>87 <h2><?php printf( __('Links (<a href="%s">Add New</a>)' ), 'link-add.php' ); ?></h2> 86 88 87 89 <p id="post-search"> … … 96 98 97 99 <div class="alignleft"> 98 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 100 <select name="action"> 101 <option value="" selected><?php _e('Actions'); ?></option> 102 <option value="delete"><?php _e('Delete'); ?></option> 103 </select> 104 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 99 105 <?php 100 106 $categories = get_terms('link_category', "hide_empty=1");
Note: See TracChangeset
for help on using the changeset viewer.