pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

devpipe private pastebin - collaborative debugging tool What's a private pastebin?


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

  1. function _cat_row( $category, $level, $name_override = false ) {
  2.         global $class;
  3.  
  4.         $pad = str_repeat( '— ', $level );
  5.         if ( current_user_can( 'manage_categories' ) ) {
  6.                 $edit = "<a href="http://www.theatons.com/blog/wp-admin/categories.php?action=edit&cat_ID=$category-%3Eterm_id" class="edit">".__( 'Edit' )."</a>
  7.  
  8. ";
  9.                 $default_cat_id = (int) get_option( 'default_category' );
  10.                 $default_link_cat_id = (int) get_option( 'default_link_category' );
  11.  
  12.                 if ( $category->term_id != $default_cat_id )
  13.                         $edit .= "
  14. <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>";
  15.                 else
  16.                         $edit .= "
  17. ".__( "Default" );
  18.         } else
  19.                 $edit = '';
  20.  
  21.         $class = ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || " class='alternate'" == $class ) ? '' : " class='alternate'";
  22.  
  23.         $category->count = number_format_i18n( $category->count );
  24.         $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;
  25.         $output = "
  26.  
  27. $category->term_id
  28. " . ( $name_override ? $name_override : $pad . ' ' . $category->name ) . "
  29. $category->description
  30. $posts_count
  31. $edit
  32.  
  33. nt
  34.  
  35. n";
  36.  
  37.         return apply_filters('cat_row', $output);
  38. }

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.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me