Don't show delete checkbox for default category. HTML validation. props johnbillion. fixes #6560 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@7595 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ba4dab3cd6
commit
2265d43956
|
@ -55,11 +55,12 @@ function _cat_row( $category, $level, $name_override = false ) {
|
|||
$output = "<tr id='cat-$category->term_id'$class>
|
||||
<th scope='row' class='check-column'>";
|
||||
if ( absint(get_option( 'default_category' ) ) != $category->term_id ) {
|
||||
$output .= "<input type='checkbox' name='delete[]' value='$category->term_id' /></th>";
|
||||
$output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />";
|
||||
} else {
|
||||
$output .= " ";
|
||||
}
|
||||
$output .= "<td>$edit</td>
|
||||
$output .= "</th>
|
||||
<td>$edit</td>
|
||||
<td>$category->description</td>
|
||||
<td class='num'>$posts_count</td>\n\t</tr>\n";
|
||||
|
||||
|
@ -86,9 +87,15 @@ function link_cat_row( $category ) {
|
|||
|
||||
$category->count = number_format_i18n( $category->count );
|
||||
$count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count;
|
||||
$output = "<tr id='link-cat-$category->term_id'$class>" .
|
||||
'<th scope="row" class="check-column"> <input type="checkbox" name="delete[]" value="' . $category->term_id . '" /></th>' .
|
||||
"<td>$edit</td>
|
||||
$output = "<tr id='link-cat-$category->term_id'$class>
|
||||
<th scope='row' class='check-column'>";
|
||||
if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) {
|
||||
$output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />";
|
||||
} else {
|
||||
$output .= " ";
|
||||
}
|
||||
$output .= "</th>
|
||||
<td>$edit</td>
|
||||
<td>$category->description</td>
|
||||
<td class='num'>$count</td></tr>";
|
||||
|
||||
|
|
Loading…
Reference in New Issue