How do I change parameters without changing the core

If you scroll further down the comment-template.php file, you’ll notice that the next available filter you can use is comment_form_defaults. With this filter you can change the default comment form configuration. add_filter( ‘comment_form_defaults’, ‘filter_comment_form_defaults’ ); function filter_comment_form_defaults( $defaults ) { $defaults[‘comment_field’] = sprintf( ‘<p class=”comment-form-comment”>%s %s</p>’, sprintf( ‘<label for=”comment”>%s</label>’, _x( ‘Please leave a comment…’, ‘Comment … Read more

Passing arguments to wp_list_comments callback function

Finally I figured it out. you may simply add your arguments to the wp_list_comments as associative key => value pairs like this: $args = array( ‘callback’ => ‘my_callback’, ‘avatar_size’ => 48, ‘type’ => ‘comment’, ‘arg1’ => $arg1 ); wp_list_comments( $args ); and then in your my_callback you have: function my_callback( $comment, $args, $depth ) where … Read more

Why does comment_reply_link launch the reply form at the wrong spot on the comment section?

Because that’s done in javascript, and you have to enqueue that javascript for it to work, as stated in the docs: If JavaScript is enabled and the comment-reply.js JavaScript is loaded the link moves the comment form to just below the comment. https://codex.wordpress.org/Function_Reference/comment_reply_link e.g. function wpse289875_enqueue_comments_reply() { if ( is_singular() && get_option( ‘thread_comments’ ) ) … Read more

Comment Walker vs. Comment Callback

We could rewrite: wp_list_comments( array( ‘callback’ => ‘bootstrap_comment_callback’, )); with the null walker parameter: wp_list_comments( array( ‘walker’ => null, ‘callback’ => ‘bootstrap_comment_callback’, )); which means we are using the default Walker_Comment class: wp_list_comments( array( ‘walker’ => new Walker_Comment, ‘callback’ => ‘bootstrap_comment_callback’, )); The Walker_Comment::start_el() method is just a wrapper for one of these protected methods: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)