PHP Cross Reference of WordPress Subversion HEAD |
| [ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] |
[Summary view] [Print] [Text view]
1 <?php 2 require_once ('admin.php'); 3 4 $title = __('Categories'); 5 $parent_file = 'link-manager.php'; 6 7 wp_enqueue_script( 'admin-categories' ); 8 require_once ('admin-header.php'); 9 10 $messages[1] = __('Category added.'); 11 $messages[2] = __('Category deleted.'); 12 $messages[3] = __('Category updated.'); 13 $messages[4] = __('Category not added.'); 14 $messages[5] = __('Category not updated.'); 15 16 if (isset($_GET['message'])) : ?> 17 18 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div> 19 <?php endif; ?> 20 21 <div class="wrap"> 22 <?php if ( current_user_can('manage_categories') ) : ?> 23 <h2><?php printf(__('Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2> 24 <?php else : ?> 25 <h2><?php _e('Categories') ?> </h2> 26 <?php endif; ?> 27 <table class="widefat"> 28 <thead> 29 <tr> 30 <th scope="col" style="text-align: center"><?php _e('ID') ?></th> 31 <th scope="col"><?php _e('Name') ?></th> 32 <th scope="col"><?php _e('Description') ?></th> 33 <th scope="col" width="90" style="text-align: center"><?php _e('Links') ?></th> 34 <th colspan="2" style="text-align: center"><?php _e('Action') ?></th> 35 </tr> 36 </thead> 37 <tbody id="the-list" class="list:link-cat"> 38 <?php 39 $categories = get_terms( 'link_category', 'hide_empty=0' ); 40 if ( $categories ) { 41 $output = ''; 42 foreach ( $categories as $category ) { 43 $category = sanitize_term($category, 'link_category', 'display'); 44 $output .= link_cat_row($category); 45 } 46 $output = apply_filters('cat_rows', $output); 47 echo $output; 48 unset($category); 49 } 50 51 ?> 52 </tbody> 53 </table> 54 55 </div> 56 57 <?php if ( current_user_can('manage_categories') ) : ?> 58 <div class="wrap"> 59 <p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the links in that category. Instead, links that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), get_term_field('name', get_option('default_link_category'), 'link_category')) ?></p> 60 </div> 61 62 <?php include ('edit-link-category-form.php'); ?> 63 64 <?php endif; ?> 65 66 <?php include ('admin-footer.php'); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs | Cross-referenced by PHPXref 0.6 and RedAlt |