Guest User

johnbillion

a guest
Apr 8th, 2009
132
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: hackadelic-toc.php
  2. ===================================================================
  3. --- hackadelic-toc.php (revision 108955)
  4. +++ hackadelic-toc.php (working copy)
  5. @@ -235,7 +235,11 @@
  6. $toc .= "<li class=\"toc-level-$level\"><a rel=\"$rel\" href=\"$href\" title=\"$text\">$text</a></li>";
  7. }
  8.  
  9. - global $id;
  10. + global $id, $post;
  11. +
  12. + if ( $post->comment_count ) #have_comments() won't work here
  13. + $toc .= '<li class="toc-level-2"><a rel="' . $rel . '" href="#comments" title="' . __( 'Comments' ) . '">' . __( 'Comments' ) . ' (' . $post->comment_count . ')</a></li>';
  14. +
  15. $tocID = ++$this->tocID;
  16. $tocID = "toc-$id-$tocID";
  17. $boxID = "$tocID-box";
RAW Paste Data