Support » Plugins » Hacks » Problem with function start_lvl in comment_template

  • Hi, I’m coding a template that needs to have a special structure for the comments.
    Searching how to make it, I founded that I can call to wp_list_comments() with the callback arg calling to a function in my functions.php. Thats was ok.
    I made my function, then I call to wp_list_comments(‘type=comment&callback=custom_comments&style=div’), when I setup the arg style=div I cant know which comments are replys cause the function start_lvl (line 1241 of wp-includes/comment-template.php) have this switch:

    1244	                switch ( $args['style'] ) {
    1245	                        case 'div':
    1246	                                break;
    1247	                        case 'ol':
    1248	                                echo "<ol class='children'>\n";
    1249	                                break;
    1250	                        default:
    1251	                        case 'ul':
    1252	                                echo "<ul class='children'>\n";
    1253	                                break;
    1254	                }

    If I setup style=div I dont get any way to know if is a children, do you know a better way to do what I need??


  • The topic ‘Problem with function start_lvl in comment_template’ is closed to new replies.