WordPress.org

Making WordPress.org

#3266 closed defect (invalid)

Comments call back arguments sequence issue.

Reported by: veerajjadhav Owned by:
Milestone: Priority: normal
Component: General Keywords:
Cc:

Description

Hi there,
I have an issue regarding the comments callback.
When I used my custom comments callback function I referred "class-walker-comment.php" file, In this file you have used ( $comment, $depth, $args ); everywhere.

https://imgur.com/fU5MVYc

But when When I used the same sequence

https://imgur.com/Y09whde
my author avatar and the reply link disappears, So I have to interchange the sequence in my callback

( $comment, $depth, $args ); => ( $comment, $args, $depth ); then my author and reply link appeared.

So in the core file the sequence is ( $comment, $depth, $args ); that did not work for me so i have to interchange the arg like ( $comment, $args, $depth );

Is this sequence intentional or I am going in wrong direction.
-Thanks

Change History (1)

#1 @Otto42
17 months ago

  • Resolution set to invalid
  • Status changed from new to closed

@veerajjadhav This is the meta.trac, where we keep tickets for tracking issues on the WordPress.org website itself. For issues in WordPress itself, the core.trac is the proper place to bring them up.

However, as this seems to be a support issue, then the Support Forums at https://wordpress.org/support are probably best for this type of problem.

But, to save time and answer your question, the order of $comment, $depth, $args is the correct order for that function call. If you examine the start_el function in that class, around line 197, you will find that the call to $this->comment() passes the function those parameters in that order.

If you are finding that you need a different order, then perhaps your custom class is mixing the parameters up somehow or otherwise calling them in the wrong order. Check your other function definitions, and maybe you mixed them up in the start_el() function or something to that effect.

Note: See TracTickets for help on using tickets.