Use has_filter on comment_post

You’re adding the action on comment_form_before_fields in comment_form_logged_in_after. The latter is called only when the user is logged in, and the former is only called when the user is not logged in. You can add WordPress actions and filters at any time after WordPress is initialized. If you’re adding the action in a plugin, add … Read more

I need to hook and change language of facebook sdk

Check the documentation of add_filter() first argument is name of filter and second one is callback function name. (both are required) See the example for your case:- add_filter(‘bimber_facebook_sdk_src’, ‘change_fb_sdk_url’); function change_fb_sdk_url($current_url) { // Variable $current_url hold the current value of URL // You can manipulate what you want // Or simply return your URL return … Read more

How to append custom text to the output of ‘categories widget’?

To append text to the end of the titles in that widget and nothing more i.e. does not matter the URL, you can just use some CSS. <li> <a class=”my-folder-categories”>Category 1</a> </li> a.my-folder-categories-folder:after {content:” folder”; This will effectivly make the text appear as so: category 1 folder Be sure to add that space in the … Read more

wp query add array by if condition

It looks like you are trying to access the $lava_listing_posts_args array from a different file (and class). You would need to pass it as an argument of your action. Although you could do this with actions since you are simply modifying the array you should probably use filters (actions and filters are essentially the same … Read more

Comment Approve – Add custom function when comment is approved

Sadly there are no hooks or filters that you could use in edit-comments.php. You’d have to build your own admin page with a custom button and use wp_set_comment_status( $comment, ‘approve’ ); to approve comment and do whatever you need to do… EDIT: I was wrong – there’s the wp_set_comment_status action inside wp_set_comment_status function https://wpseek.com/function/wp_set_comment_status/ do_action( … Read more