Changeset 6299 for trunk/wp-admin/includes/template.php
- Timestamp:
- 10/31/2007 03:53:32 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/template.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r6277 r6299 35 35 global $class; 36 36 37 $category = get_category( $category ); 38 37 39 $pad = str_repeat( '— ', $level ); 38 40 if ( current_user_can( 'manage_categories' ) ) { … … 48 50 $edit = ''; 49 51 50 $class = ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || " class='alternate'" == $class )? '' : " class='alternate'";52 $class = " class='alternate'" == $class ? '' : " class='alternate'"; 51 53 52 54 $category->count = number_format_i18n( $category->count ); … … 60 62 61 63 return apply_filters('cat_row', $output); 64 } 65 66 function link_cat_row( $category ) { 67 global $class; 68 69 if ( !$category = get_term( $category, 'link_category' ) ) 70 return false; 71 if ( is_wp_error( $category ) ) 72 return $category; 73 74 if ( current_user_can( 'manage_categories' ) ) { 75 $edit = "<a href='link-category.php?action=edit&cat_ID=$category->term_id' class='edit'>".__( 'Edit' )."</a></td>"; 76 $default_cat_id = (int) get_option( 'default_link_category' ); 77 78 $delete_url = wp_nonce_url( "link-category.php?action=delete&cat_ID=$category->term_id", "delete-link-category_$category->term_id" ); 79 if ( $category->term_id != $default_cat_id ) 80 $edit .= "<td><a href='$delete_url' class='delete:the-list:link-cat-$category->term_id delete'>" . __( 'Delete' ) . "</a>"; 81 else 82 $edit .= "<td style='text-align:center'>" . __( "Default" ); 83 } else { 84 $edit = ''; 85 } 86 87 $class = " class='alternate'" == $class ? '' : " class='alternate'"; 88 89 $category->count = number_format_i18n( $category->count ); 90 $count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count; 91 $output = "<tr id='link-cat-$category->term_id'$class> 92 <th scope='row' style='text-align: center'>$category->term_id</th> 93 <td>" . ( $name_override ? $name_override : $pad . ' ' . $category->name ) . "</td> 94 <td>$category->description</td> 95 <td align='center'>$count</td> 96 <td>$edit</td>\n\t</tr>\n"; 97 98 return apply_filters( 'link_cat_row', $output ); 62 99 } 63 100
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)