Em có đóng gói thành một file plugin để ở cuối bài viết, anh/chị có thể tải về kích hoạt sử dụng. Tắt mở linh hoạt.
Nếu không muốn dùng plugin thì chỉ cần đơn giản là copy toàn bộ code trên dán vào file functions.php của theme là dùng được.
function gaco_hook(){
echo current_filter().'</br>';
}
add_action('flatsome_woocommerce_shop_loop_images','gaco_hook');
add_action('flatsome_sale_flash','gaco_hook');
add_action('flatsome_products_before','gaco_hook');
add_action('flatsome_products_after','gaco_hook');
add_action('flatsome_product_title_tools','gaco_hook');
add_action('flatsome_product_title','gaco_hook');
add_action('flatsome_product_image_tools_top','gaco_hook');
add_action('flatsome_product_image_tools_bottom','gaco_hook');
add_action('flatsome_product_box_tools_top','gaco_hook');
add_action('flatsome_product_box_tools_bottom','gaco_hook');
add_action('flatsome_product_box_after','gaco_hook');
add_action('flatsome_product_box_actions','gaco_hook');
add_action('flatsome_portfolio_title_right','gaco_hook');
add_action('flatsome_portfolio_title_left','gaco_hook');
add_action('flatsome_portfolio_title_after','gaco_hook');
add_action('flatsome_woocommerce_shop_loop_images','gaco_hook');
add_action('flatsome_sale_flash','gaco_hook');
add_action('flatsome_header_wrapper','gaco_hook');
add_action('flatsome_header_elements','gaco_hook');
add_action('flatsome_header_background','gaco_hook');
add_action('flatsome_footer','gaco_hook');
add_action('flatsome_category_title_alt','gaco_hook');
add_action('flatsome_category_title','gaco_hook');
add_action('flatsome_cart_sidebar','gaco_hook');
add_action('flatsome_breadcrumb','gaco_hook');
add_action('flatsome_blog_post_before','gaco_hook');
add_action('flatsome_blog_post_after','gaco');
add_action('flatsome_before_single_product_custom','gaco_hook');
add_action('flatsome_before_product_sidebar','gaco_hook');
add_action('flatsome_before_product_page','gaco_hook');
add_action('flatsome_woocommerce_shop_loop_images','gaco_hook');
add_action('flatsome_sale_flash','gaco_hook');
add_action('flatsome_before_product_images','gaco_hook');
add_action('flatsome_before_page_content','gaco_hook');
add_action('flatsome_before_page','gaco_hook');
add_action('flatsome_before_header','gaco_hook');
add_action('flatsome_before_footer','gaco_hook');
add_action('flatsome_before_comments','gaco_hook');
add_action('flatsome_before_breadcrumb','gaco_hook');
add_action('flatsome_before_blog','gaco_hook');
add_action('flatsome_before_404','gaco_hook');
add_action('flatsome_after_product_page','gaco_hook');
add_action('flatsome_after_product_images','gaco_hook');
add_action('flatsome_absolute_footer_primary','gaco_hook');
add_action('flatsome_absolute_footer_secondary','gaco_hook');
add_action('flatsome_account_links','gaco_hook');
add_action('flatsome_after_404','gaco_hook');
add_action('flatsome_after_account_user','gaco_hook');
add_action('flatsome_after_blog','gaco_hook');
add_action('flatsome_after_body_open','gaco_hook');
add_action('flatsome_after_breadcrumb','gaco_hook');
add_action('flatsome_after_footer','gaco_hook');
add_action('flatsome_after_page_content','gaco_hook');
add_action('flatsome_after_page','gaco_hook');
add_action('flatsome_after_header_bottom','gaco_hook');
add_action('flatsome_after_header','gaco_hook');
Hết phần 1, đón xem phần hai tại đây