equal
deleted
inserted
replaced
16 |
16 |
17 if ( ! current_user_can('manage_links') ) |
17 if ( ! current_user_can('manage_links') ) |
18 wp_die( __('You do not have sufficient permissions to edit the links for this blog.') ); |
18 wp_die( __('You do not have sufficient permissions to edit the links for this blog.') ); |
19 |
19 |
20 if ( 'delete' == $doaction ) { |
20 if ( 'delete' == $doaction ) { |
21 foreach ( (array) $_GET['linkcheck'] as $link_id ) { |
21 $bulklinks = (array) $_GET['linkcheck']; |
|
22 foreach ( $bulklinks as $link_id ) { |
22 $link_id = (int) $link_id; |
23 $link_id = (int) $link_id; |
23 |
24 |
24 wp_delete_link($link_id); |
25 wp_delete_link($link_id); |
25 } |
26 } |
26 |
27 |
27 wp_redirect( wp_get_referer() ); |
28 wp_safe_redirect( wp_get_referer() ); |
28 exit; |
29 exit; |
29 } |
30 } |
30 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { |
31 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { |
31 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); |
32 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); |
32 exit; |
33 exit; |
69 break; |
70 break; |
70 } ?> |
71 } ?> |
71 |
72 |
72 <div class="wrap nosubsub"> |
73 <div class="wrap nosubsub"> |
73 <?php screen_icon(); ?> |
74 <?php screen_icon(); ?> |
74 <h2><?php echo esc_html( $title ); |
75 <h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php |
75 if ( isset($_GET['s']) && $_GET['s'] ) |
76 if ( isset($_GET['s']) && $_GET['s'] ) |
76 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( stripslashes($_GET['s']) ) ); ?> |
77 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( stripslashes($_GET['s']) ) ); ?> |
77 </h2> |
78 </h2> |
78 |
79 |
79 <?php |
80 <?php |