We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

0

In cases like this the Wordpress adds a hash (unique id) to the function name and stores it in the global $wp_filter variable. So if you use remove_filter function nothing will happen. Even if you add the class name to the function name like remove_filter('plugins_loaded', ['MyClass', 'my_action']). All you can is to remove all the my_action hooks from the ...


0

You can't hook an AJAX action from within a shortcode, and the constructor for Wp_Lbs_Calendar is only running inside your shortcode. This means that the actions are only hooked to wp_ajax_ when your shortcode is used on the page. But the AJAX request is a separate request to admin-ajax.php, and your shortcode is not running on on that page, so the actions ...


0

You unhook things the way you added them. In this case, you need to pass a callable that matches what was added. Normally this is the function name e.g. 'my_function', but for an non-static method in an object, it has to be [ $object, 'method_name' ] where $object is a reference to the object. How you get that reference though is a murkier subject. Some ...


1

I had the same problem, a weird attribute wfd-id="" on every element. For me it was kaspersky password manager chrome extension, after deactivate it, everything backs to normal again, the weird attribute as gone. Hope it helps someone.


0

The get_query_var() function and/or method only works with registered WordPress query_vars. You can actually view the method via get_query_var(). The normal URL parameters you can access with the normal PHP super global $_GET.


0

Despite calling a function directly, do this in a more elegant way: pass an anonymous function as a callback. For example: I have a single function to translate the title, content, and excerpt from my posts. So, I need to pass to this main function some arguments saying who is calling. add_filter( 'the_title', function( $text ) { return ...


1

Theres no filter for that function. You can find the code in wp_includes/post.php (Obviously don't edit it there). Core File


Top 50 recent answers are included