WordPress.org

Make WordPress Core

Changeset 7596


Ignore:
Timestamp:
04/03/08 05:03:44 (6 years ago)
Author:
markjaquith
Message:

Don't show delete checkbox for default category. HTML validation. props johnbillion. fixes #6560 for 2.5.1

File:
1 edited

Legend:

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

    r7528 r7596  
    5656               <th scope='row' class='check-column'>"; 
    5757    if ( absint(get_option( 'default_category' ) ) != $category->term_id ) { 
    58         $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' /></th>"; 
     58        $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />"; 
    5959    } else { 
    6060        $output .= "&nbsp;"; 
    6161    } 
    62     $output .= "<td>$edit</td> 
     62    $output .= "</th> 
     63                <td>$edit</td> 
    6364                <td>$category->description</td> 
    6465                <td class='num'>$posts_count</td>\n\t</tr>\n"; 
     
    8788    $category->count = number_format_i18n( $category->count ); 
    8889    $count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count; 
    89     $output = "<tr id='link-cat-$category->term_id'$class>" . 
    90         '<th scope="row" class="check-column"> <input type="checkbox" name="delete[]" value="' . $category->term_id . '" /></th>' . 
    91         "<td>$edit</td> 
    92         <td>$category->description</td> 
    93         <td class='num'>$count</td></tr>"; 
     90    $output = "<tr id='link-cat-$category->term_id'$class> 
     91               <th scope='row' class='check-column'>"; 
     92    if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) { 
     93        $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />"; 
     94    } else { 
     95        $output .= "&nbsp;"; 
     96    } 
     97    $output .= "</th> 
     98                <td>$edit</td> 
     99                <td>$category->description</td> 
     100                <td class='num'>$count</td></tr>"; 
    94101 
    95102    return apply_filters( 'link_cat_row', $output ); 
Note: See TracChangeset for help on using the changeset viewer.