How pass args to wp_list_comments callback?

After looking at the wp_list_comments() and Walker_Comment sources I would assume the callback is what the Walker uses to render single comments. And the callback recieves three parameters $comment, $args, $depth when the Walker calls it. Based on this, I assume you should be able to just push custom key-value pairs to your $args array … Read more

WordPress plugin blog creation

pluginprefix_setup_post_type() is a method inside the SoaneNews class, not a function, but inside your activate() method you’ve called a function with that name: function activate(){ pluginprefix_setup_post_type(); flush_rewrite_rules(); } To call the pluginprefix_setup_post_type() method from within the class, you need to do it like this: $this->pluginprefix_setup_post_type();

Use PHP Class in WordPress functions

If you have defined the class MyCart directly in functions.php with your hooks. I’d expect for the following to work: // add action $cart = new MyCart(); function emdr_add_to_cart(){ $items = $cartClass->get_users_cart_contents(); // process items } add_action( ‘woocommerce_add_to_cart’, ’emdr_add_to_cart’); I might also add that duplicating the “state” of the users cart in 2 places is … Read more

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