wordpress functions.php

Posted by Ayrton on Stack Overflow See other posts from Stack Overflow or by Ayrton
Published on 2010-04-09T17:00:12Z Indexed on 2010/04/09 17:03 UTC
Read the original article Hit count: 413

Filed under:
|

Hi

I'm having issues with the functions.php file with variables

        $prev_dept = 0;
        $comment_count = 0;
        $comment_index = 0;
        function setCommentCount($size){
            $comment_count = $size;
        }        
        function flowhub_comment($comment, $args, $depth) {
            $comment_index ++;            

            if($depth > 1) {
                $line = true;
            }
            echo '$prev_dept:' . $prev_dept.'<br>';
        }

I can't access $comment_index so I can't set nor get it from within a function. What should I do to fix this?

Yours truthfully

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about php