Get Taxonomy name from “registered_taxonomy” hook

$args is an array, not an object: function test( $taxonomy, $object_type, $args ) { echo $args[‘name’]; } add_action( ‘registered_taxonomy’, ‘test’, 10, 3 ); EDIT Using the create_term action: function my_create( $term_id, $tt_id, $taxonomy ){ $term = get_term( $term_id, $taxonomy ); echo $term->name; } add_action( ‘create_term’, ‘my_create’, 10, 3 );

How to remove products-links after the product title using remove_action

First, you’re correct that removing the action calling the products_links method would work, and that this is specifically MrBara_WooCommerce->products_links(). In your functions.php, you can just use remove_action without wrapping it in a function used as a callback for another add_action, btw. so: remove_action(‘products_links, array(‘MrBara_WooCommerce’, ‘woocommerce_single_product_summary, 0) 10 is default priority, and while we may assume … Read more

Add html code in admin page

Try doing little CSS work .admin-button{position:fixed; bottom:20px; right:20px; z-index:999;} add class to your button code, here I am using “.admin-button” for example .This will make your button appear in bottom 20px up and 20px away from right , more do as wherever you want to place. Hope this small thing can work for you

Add/remove CRON action depending on variable

I am not sure why the remove_action isn’t working because by the looks of your code, it should. Alternatively, you can add the conditional logic to your generate_sitemap() function generate_sitemap() { global $create_sitemap; if ( $create_sitemap ) return false; $sitemap = ‘<?xml version=”1.0″ encoding=”UTF-8″?>’; $sitemap .= ‘<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>’; // Get a query of all jobs … Read more

why does not work ajax that add_action registered in wordpress

The AJAX request is a separate request from the one that renders your page. Your AJAX handler is getting registered on the request that serves the page, but not the AJAX request, which is the one that matters. Move your add_action and function to your theme’s functions.php file, which loads on all requests.

call custom action after delete account

It depends on what the function myAction() is doing. Your order is this: pluging defines action hook with do_action( ‘bp_members_delete_account_after_submit’ ); You hook a function on that with add_action( ‘bp_members_delete_account_after_submit’, ‘action_bp_members_delete_account_after_submit’ ); the function action_bp_members_delete_account_after_submit() is then adding a hook named ‘myAction’ and passing it two arguments as strings ‘arg1’ and ‘arg2’. But there is … Read more

Remove genesis_404 hook from genesis_loop [closed]

I found a solution for this problem: For some reason, the add_action() and remove_action() had to be contained inside another action, genesis_meta: add_action( ‘genesis_meta’, function () { if (is_404()) { remove_action( ‘genesis_loop’, ‘genesis_404’ ); add_action( ‘genesis_loop’, ‘genesis_customizations_404’ ); } }, 11);