Changeset 6804 for trunk/wp-admin/edit-link-categories.php
- Timestamp:
- 02/13/2008 07:32:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-link-categories.php
r6555 r6804 20 20 21 21 <div class="wrap"> 22 23 <form id="posts-filter" action="" method="get"> 22 24 <?php if ( current_user_can('manage_categories') ) : ?> 23 <h2><?php printf(__(' Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2>25 <h2><?php printf(__('Manage Link Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2> 24 26 <?php else : ?> 25 <h2><?php _e(' Categories') ?> </h2>27 <h2><?php _e('Manage Link Categories') ?> </h2> 26 28 <?php endif; ?> 29 30 <p id="post-search"> 31 <input type="text" id="post-search-input" name="s" value="<?php echo attribute_escape(stripslashes($_GET['s'])); ?>" /> 32 <input type="submit" value="<?php _e( 'Search Categories' ); ?>" /> 33 </p> 34 35 <br style="clear:both;" /> 36 37 <div class="tablenav"> 38 39 <?php 40 $pagenum = absint( $_GET['pagenum'] ); 41 if ( empty($pagenum) ) 42 $pagenum = 1; 43 if( !$catsperpage || $catsperpage < 0 ) 44 $catsperpage = 3; 45 46 $page_links = paginate_links( array( 47 'base' => add_query_arg( 'pagenum', '%#%' ), 48 'format' => '', 49 'total' => ceil(wp_count_terms('link_category') / $catsperpage), 50 'current' => $pagenum 51 )); 52 53 if ( $page_links ) 54 echo "<div class='tablenav-pages'>$page_links</div>"; 55 ?> 56 57 <div style="float: left"> 58 <input type="button" value="<?php _e('Delete'); ?>" name="deleteit" /> 59 </div> 60 61 <br style="clear:both;" /> 62 </div> 63 </form> 64 65 <br style="clear:both;" /> 66 27 67 <table class="widefat"> 28 68 <thead> 29 69 <tr> 30 <th scope="col" style="text-align: center"><?php _e('ID') ?></th>70 <th scope="col" style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('deletetags'));" /></th> 31 71 <th scope="col"><?php _e('Name') ?></th> 32 72 <th scope="col"><?php _e('Description') ?></th> 33 73 <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 74 </tr> 36 75 </thead> 37 76 <tbody id="the-list" class="list:link-cat"> 38 77 <?php 39 $categories = get_terms( 'link_category', 'hide_empty=0' ); 78 $start = ($pagenum - 1) * $catsperpage; 79 $args = array('offset' => $start, 'number' => $catsperpage, 'hide_empty' => 0); 80 if ( !empty( $_GET['s'] ) ) 81 $args['search'] = $_GET['s']; 82 83 $categories = get_terms( 'link_category', $args ); 40 84 if ( $categories ) { 41 85 $output = ''; … … 53 97 </table> 54 98 99 <br style="clear:both;" /> 100 101 <div class="tablenav"> 102 103 <?php 104 if ( $page_links ) 105 echo "<div class='tablenav-pages'>$page_links</div>"; 106 ?> 107 <br style="clear:both;" /> 108 </div> 109 55 110 </div> 56 111
Note: See TracChangeset
for help on using the changeset viewer.