Changeset 6299 for trunk/wp-admin/edit-link-categories.php
- Timestamp:
- 10/31/2007 03:53:32 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-link-categories.php
r6118 r6299 5 5 $parent_file = 'link-manager.php'; 6 6 7 //wp_enqueue_script( 'admin-categories' ); TODO: Fix AJAX 7 wp_enqueue_script( 'admin-categories' ); 8 8 require_once ('admin-header.php'); 9 9 … … 14 14 $messages[5] = __('Category not updated.'); 15 15 16 function link_cat_row($category) { 17 global $class; 16 if (isset($_GET['message'])) : ?> 18 17 19 if ( current_user_can( 'manage_categories' ) ) {20 $edit = "<a href='link-category.php?action=edit&cat_ID=$category->term_id' class='edit'>".__( 'Edit' )."</a></td>";21 $default_cat_id = (int) get_option( 'default_link_category' );22 23 if ( $category->term_id != $default_cat_id )24 $edit .= "<td><a href='" . wp_nonce_url( "link-category.php?action=delete&cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id ) . "' onclick=\"return deleteSomething( 'cat', $category->term_id, '" . js_escape(sprintf( __("You are about to delete the category '%s'.\nAll links that were only assigned to this category will be assigned to the '%s' category.\n'OK' to delete, 'Cancel' to stop." ), $category->name, get_term_field( 'name', $default_cat_id, 'link_category' ))) . "' );\" class='delete'>".__( 'Delete' )."</a>";25 else26 $edit .= "<td style='text-align:center'>".__( "Default" );27 } else {28 $edit = '';29 }30 31 $class = ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || " class='alternate'" == $class ) ? '' : " class='alternate'";32 33 $category->count = number_format_i18n( $category->count );34 $count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count;35 return "<tr id='cat-$category->term_id'$class>36 <th scope='row' style='text-align: center'>$category->term_id</th>37 <td>" . ( $name_override ? $name_override : $pad . ' ' . $category->name ) . "</td>38 <td>$category->description</td>39 <td align='center'>$count</td>40 <td>$edit</td>\n\t</tr>\n";41 }42 ?>43 44 <?php if (isset($_GET['message'])) : ?>45 18 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div> 46 19 <?php endif; ?> … … 62 35 </tr> 63 36 </thead> 64 <tbody id="the-list" >37 <tbody id="the-list" class="list:link-cat"> 65 38 <?php 66 39 $categories = get_terms( 'link_category', 'hide_empty=0' );
Note: See TracChangeset
for help on using the changeset viewer.