X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/449d082fcc4873c1f7d363a0d9f7409be7f6e77d..312084b5d95c21feb519ff03decf948420e1f6fa:/wp-admin/edit-link-categories.php diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php index 3636635c..90dcce66 100644 --- a/wp-admin/edit-link-categories.php +++ b/wp-admin/edit-link-categories.php @@ -18,13 +18,14 @@ if ( isset($_GET['action']) && isset($_GET['delete']) ) { wp_die(__('Cheatin’ uh?')); if ( 'delete' == $doaction ) { - foreach( (array) $_GET['delete'] as $cat_ID ) { - $cat_name = get_term_field('name', $cat_ID, 'link_category'); - $default_cat_id = get_option('default_link_category'); + $cats = (array) $_GET['delete']; + $default_cat_id = get_option('default_link_category'); + foreach( $cats as $cat_ID ) { + $cat_ID = (int) $cat_ID; // Don't delete the default cats. if ( $cat_ID == $default_cat_id ) - wp_die(sprintf(__("Can’t delete the %s category: this is the default one"), $cat_name)); + wp_die( sprintf( __("Can’t delete the %s category: this is the default one"), get_term_field('name', $cat_ID, 'link_category') ) ); wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); } @@ -61,9 +62,9 @@ $messages[6] = __('Categories deleted.'); ?>
-

' . __('Search results for “%s”') . '', wp_specialchars( stripslashes($_GET['s']) ) ); ?> + printf( '' . __('Search results for “%s”') . '', esc_html( stripslashes($_GET['s']) ) ); ?>

@@ -73,9 +74,9 @@ endif; ?>

@@ -112,7 +113,7 @@ if ( $page_links ) - +
@@ -166,7 +167,7 @@ if ( $page_links ) - +
@@ -189,19 +190,19 @@ if ( $page_links ) $category = (object) array(); $category->parent = 0; do_action('add_link_category_form_pre', $category); ?>
-

+

- +
- +

@@ -209,9 +210,10 @@ if ( $page_links )
+

-

+

@@ -224,20 +226,5 @@ if ( $page_links ) - -