WordPress.org

Make WordPress Core

Changeset 7329


Ignore:
Timestamp:
03/16/2008 10:00:11 AM (10 years ago)
Author:
westi
Message:

Don't show a check box for deleting the default category.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r7322 r7329  
    4444    if ( current_user_can( 'manage_categories' ) ) {
    4545        $edit = "<a class='row-title' href='categories.php?action=edit&amp;cat_ID=$category->term_id'>". ( $name_override ? $name_override : $pad . ' ' . $category->name ) ."</a>";
    46         $default_cat_id = (int) get_option( 'default_category' );
    4746    } else {
    4847        $edit = ( $name_override ? $name_override : $pad . ' ' . $category->name );
     
    5453    $posts_count = ( $category->count > 0 ) ? "<a href='edit.php?cat=$category->term_id'>$category->count</a>" : $category->count;
    5554    $output = "<tr id='cat-$category->term_id'$class>
    56         <th scope='row' class='check-column'><input type='checkbox' name='delete[]' value='$category->term_id' /></th>
    57         <td>$edit</td>
    58         <td>$category->description</td>
    59         <td class='num'>$posts_count</td>\n\t</tr>\n";
     55               <th scope='row' class='check-column'>";
     56    if ( absint(get_option( 'default_category' ) ) != $category->term_id ) {
     57        $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' /></th>";
     58    } else {
     59        $output .= "&nbsp;";
     60    }
     61    $output .= "<td>$edit</td>
     62                <td>$category->description</td>
     63                <td class='num'>$posts_count</td>\n\t</tr>\n";
    6064
    6165    return apply_filters('cat_row', $output);
Note: See TracChangeset for help on using the changeset viewer.