equal
deleted
inserted
replaced
10 */ |
10 */ |
11 |
11 |
12 /** Load WordPress Administration Bootstrap */ |
12 /** Load WordPress Administration Bootstrap */ |
13 require_once __DIR__ . '/admin.php'; |
13 require_once __DIR__ . '/admin.php'; |
14 |
14 |
15 wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) ); |
15 $action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : ''; |
|
16 $cat_id = ! empty( $_REQUEST['cat_id'] ) ? absint( $_REQUEST['cat_id'] ) : 0; |
|
17 $link_id = ! empty( $_REQUEST['link_id'] ) ? absint( $_REQUEST['link_id'] ) : 0; |
16 |
18 |
17 if ( ! current_user_can( 'manage_links' ) ) { |
19 if ( ! current_user_can( 'manage_links' ) ) { |
18 wp_link_manager_disabled_message(); |
20 wp_link_manager_disabled_message(); |
19 } |
21 } |
20 |
22 |
43 $deleted = 0; |
45 $deleted = 0; |
44 foreach ( $linkcheck as $link_id ) { |
46 foreach ( $linkcheck as $link_id ) { |
45 $link_id = (int) $link_id; |
47 $link_id = (int) $link_id; |
46 |
48 |
47 if ( wp_delete_link( $link_id ) ) { |
49 if ( wp_delete_link( $link_id ) ) { |
48 $deleted++; |
50 ++$deleted; |
49 } |
51 } |
50 } |
52 } |
51 |
53 |
52 wp_redirect( "$this_file?deleted=$deleted" ); |
54 wp_redirect( "$this_file?deleted=$deleted" ); |
53 exit; |
55 exit; |