]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/edit-link-categories.php
Wordpress 2.6.2
[autoinstalls/wordpress.git] / wp-admin / edit-link-categories.php
index b8dfebcfaa3d020bdc11f8e00fb4c6d5fab4bc0f..c7a5e9d99efbf6cc40e2df2001250ed97e3f723d 100644 (file)
@@ -10,12 +10,13 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
 
        foreach( (array) $_GET['delete'] as $cat_ID ) {
                $cat_name = get_term_field('name', $cat_ID, 'link_category');
 
        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');
+               
                // Don't delete the default cats.
                // Don't delete the default cats.
-               if ( $cat_ID == get_option('default_link_category') )
+               if ( $cat_ID == $default_cat_id )
                        wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
 
                        wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
 
-               wp_delete_term($cat_ID, 'link_category');
+               wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id));
        }
 
        $location = 'edit-link-categories.php';
        }
 
        $location = 'edit-link-categories.php';
@@ -62,6 +63,7 @@ endif; ?>
 <?php endif; ?>
 
 <p id="post-search">
 <?php endif; ?>
 
 <p id="post-search">
+       <label class="hidden" for="post-search-input"><?php _e( 'Search Categories' ); ?>:</label>
        <input type="text" id="post-search-input" name="s" value="<?php echo attribute_escape(stripslashes($_GET['s'])); ?>" />
        <input type="submit" value="<?php _e( 'Search Categories' ); ?>" class="button" />
 </p>
        <input type="text" id="post-search-input" name="s" value="<?php echo attribute_escape(stripslashes($_GET['s'])); ?>" />
        <input type="submit" value="<?php _e( 'Search Categories' ); ?>" class="button" />
 </p>
@@ -101,7 +103,7 @@ if ( $page_links )
 <table class="widefat">
        <thead>
        <tr>
 <table class="widefat">
        <thead>
        <tr>
-        <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
+        <th scope="col" class="check-column"><input type="checkbox" /></th>
         <th scope="col"><?php _e('Name') ?></th>
         <th scope="col"><?php _e('Description') ?></th>
         <th scope="col" class="num" style="width: 90px;"><?php _e('Links') ?></th>
         <th scope="col"><?php _e('Name') ?></th>
         <th scope="col"><?php _e('Description') ?></th>
         <th scope="col" class="num" style="width: 90px;"><?php _e('Links') ?></th>