Changeset 6804
- Timestamp:
- 02/13/2008 07:32:50 AM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/categories.php
r6799 r6804 127 127 </table> 128 128 129 <br style="clear:both;" /> 130 131 <div class="tablenav"> 132 <br style="clear:both;" /> 133 </div> 134 129 135 </div> 130 136 -
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 -
trunk/wp-admin/edit-pages.php
r6798 r6804 118 118 ?> 119 119 120 <div class="tablenav"> 121 <br style="clear:both;" /> 122 </div> 123 120 124 </div> 121 125 -
trunk/wp-admin/includes/template.php
r6800 r6804 71 71 72 72 if ( current_user_can( 'manage_categories' ) ) { 73 $edit = "<a href='link-category.php?action=edit&cat_ID=$category->term_id' class='edit'>". __( 'Edit' )."</a></td>";73 $edit = "<a href='link-category.php?action=edit&cat_ID=$category->term_id' class='edit'>". ( $name_override ? $name_override : $category->name ) ."</a>"; 74 74 $default_cat_id = (int) get_option( 'default_link_category' ); 75 76 $delete_url = wp_nonce_url( "link-category.php?action=delete&cat_ID=$category->term_id", "delete-link-category_$category->term_id" );77 if ( $category->term_id != $default_cat_id )78 $edit .= "<td><a href='$delete_url' class='delete:the-list:link-cat-$category->term_id delete'>" . __( 'Delete' ) . "</a>";79 else80 $edit .= "<td style='text-align:center'>" . __( "Default" );81 75 } else { 82 $edit = '';76 $edit = ( $name_override ? $name_override : $category->name ); 83 77 } 84 78 … … 87 81 $category->count = number_format_i18n( $category->count ); 88 82 $count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count; 89 $output = "<tr id='link-cat-$category->term_id'$class> 90 <th scope='row' style='text-align: center'>$category->term_id</th>91 <td>" . ( $name_override ? $name_override : $category->name ) . "</td>83 $output = "<tr id='link-cat-$category->term_id'$class>" . 84 '<td style="text-align: center"> <input type="checkbox" name="delete_tags[]" value="' . $category->term_id . '" /></td>' . 85 "<td>$edit</td> 92 86 <td>$category->description</td> 93 <td align='center'>$count</td> 94 <td>$edit</td>\n\t</tr>\n"; 87 <td align='center'>$count</td>"; 95 88 96 89 return apply_filters( 'link_cat_row', $output ); -
trunk/wp-admin/link-manager.php
r6799 r6804 204 204 <div id="ajax-response"></div> 205 205 206 <div class="tablenav"> 207 <br style="clear:both;" /> 208 </div> 209 206 210 </form> 207 211
Note: See TracChangeset
for help on using the changeset viewer.