- function _cat_row( $category, $level, $name_override = false ) {
- global $class;
- $pad = str_repeat( '— ', $level );
- if ( current_user_can( 'manage_categories' ) ) {
- $edit = "<a href="http://www.theatons.com/blog/wp-admin/categories.php?action=edit&cat_ID=$category-%3Eterm_id" class="edit">".__( 'Edit' )."</a>
- ";
- $default_cat_id = (int) get_option( 'default_category' );
- $default_link_cat_id = (int) get_option( 'default_link_category' );
- if ( $category->term_id != $default_cat_id )
- $edit .= "
- <a href="http://www.theatons.com/blog/wp-admin/%22%20.%20wp_nonce_url%28%20%22categories.php?action=delete&cat_ID=$category-%3Eterm_id%22,">term_id ) . "' onclick=\"return deleteSomething( 'cat', $category->term_id, '" . js_escape(sprintf( __("You are about to delete the category '%s'.nAll posts that were only assigned to this category will be assigned to the '%s' category.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_catname( $default_cat_id ), get_catname( $default_link_cat_id ) )) . "' );\" class='delete'>".__( 'Delete' )."</a>";
- else
- $edit .= "
- ".__( "Default" );
- } else
- $edit = '';
- $class = ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || " class='alternate'" == $class ) ? '' : " class='alternate'";
- $category->count = number_format_i18n( $category->count );
- $posts_count = ( $category->count > 0 ) ? "<a href="http://www.theatons.com/blog/wp-admin/edit.php?cat=$category-%3Eterm_id">$category->count</a>" : $category->count;
- $output = "
- $category->term_id
- " . ( $name_override ? $name_override : $pad . ' ' . $category->name ) . "
- $category->description
- $posts_count
- $edit
- nt
- n";
- return apply_filters('cat_row', $output);
- }
Posted by ntom on Mon 11 Feb 11:42 (modification of post by view diff)
report spam | View followups from Anonymous and tom taylor | download | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.