Callback function in extras.php

Hi,

I have a function (my_function_comments) in my lib/extras.php file to modify the comments markup. Now I need to use it as a callback function in templates/comments.php as this:

<?php wp_list_comments(array('style' => 'ol', 
                              'short_ping' => true,
                              'avatar_size' => 60,
                              'type' => 'comment',
                              'callback' => 'my_function_comments',
                              )); ?>

Of course, my_function_comments is not on this file so I’ve coded the call to wp_list_comments like this:

<?php use Roots\Sage\Extras; ?>
<?php wp_list_comments(array('style' => 'ol', 
                              'short_ping' => true,
                              'avatar_size' => 60,
                              'type' => 'comment',
                              'callback' => 'Extras\my_function_comments',
                              )); ?>

Ok, the callback function as this is obviouslly wrong, but I don’t know how to write it to call it properly.

Maybe someone can help me to figure out this.

Thank you!

@carlosfaria check this post Can't find the way of changing the HTML structure of a comment

Ah - I see you’ve had this answered over on Stackoverflow - adding here for future reference: http://stackoverflow.com/a/33002898/1014395

Yes I figured it out by the comments on stackoverflow. I paste it here for future reference aswell. Thank you!

    <?php wp_list_comments(array('style' => 'ol', 
        'short_ping' => true,
        'avatar_size' => 60,
        'type' => 'comment',
        'callback' => 'Roots\Sage\Extras\my_function_comments',
        )); ?>