Các hàm Hooks (Actions & Filters) trong theme Flatsome thần thánh



Cập nhật 11/08/2020

Các hàm Hooks (Actions & Filters) trong theme Flatsome thần thánh để thêm các code tùy chỉnh của mình vào đúng vị trí nhé!

Theme Hooks (Actions & Filters)

Table of Contents

Actions

52 actions

Filters

29 filters

Type: action

Files:

  • template-parts/footer/footer-absolute.php

Back to top

Type: action

Hooked:

  • flatsome_footer_payment_icons – 10

Files:

  • template-parts/footer/footer-absolute.php

Back to top

Type: action

Hooked:

  • flatsome_wishlist_account_item – 10

Files:

  • woocommerce/myaccount/dashboard-links.php
  • woocommerce/myaccount/account-links.php

Back to top

flatsome_after_404

Type: action

Files:

  • 404.php

Back to top

flatsome_after_account_user

Type: action

Files:

  • woocommerce/myaccount/account-user.php

Back to top

flatsome_after_blog

Type: action

Files:

  • template-parts/posts/layout-left-sidebar.php
  • template-parts/posts/layout-right-sidebar.php
  • template-parts/posts/layout.php

Back to top

flatsome_after_body_open

Type: action

Hooked:

  • flatsome_after_body_open – 10

Files:

  • header.php

Back to top

flatsome_after_breadcrumb

Type: action

Files:

  • woocommerce/global/breadcrumb.php
  • inc/integrations/wp-seo/class-wp-seo.php

Back to top

Type: action

Hooked:

  • flatsome_html_after_footer – 10

Files:

  • template-parts/footer/footer.php

Back to top

flatsome_after_header

Type: action

Hooked:

  • flatsome_html_after_header – 1
  • flatsome_custom_blog_header – 10
  • flatsome_single_page_header – 10
  • flatsome_category_header – 10
  • flatsome_product_header – 10
  • flatsome_woocommerce_add_notice – 100

Files:

  • single-blocks.php
  • page-blank-landingpage.php
  • header.php

Back to top

flatsome_after_header_bottom

Type: action

Files:

  • template-parts/header/header-bottom.php

Back to top

flatsome_after_page

Type: action

Hooked:

  • flatsome_wp_link_pages – 10
  • flatsome_page_passord_required_bottom – 99

Files:

  • page-blank-sub-nav-vertical.php
  • page-blank-title-center.php
  • page-transparent-header-light.php
  • page-right-sidebar.php
  • page-single-page-nav.php
  • single-blocks.php
  • page-blank-landingpage.php
  • page-blank.php
  • page-my-account.php
  • page-left-sidebar.php
  • page-transparent-header.php
  • page.php
  • page-single-page-nav-transparent.php
  • page-header-on-scroll.php
  • page-single-page-nav-transparent-light.php

Back to top

flatsome_after_page_content

Type: action

Files:

  • page.php

Back to top

flatsome_after_product_images

Type: action

Files:

  • woocommerce/single-product/product-image-stacked.php
  • woocommerce/single-product/product-image-wide.php
  • woocommerce/single-product/product-image.php
  • woocommerce/single-product/product-image-vertical.php

Back to top

flatsome_after_product_page

Type: action

Hooked:

  • flatsome_product_bottom_content – 10

Files:

  • woocommerce/single-product.php

Back to top

flatsome_before_404

Type: action

Files:

  • 404.php

Back to top

flatsome_before_blog

Type: action

Hooked:

  • flatsome_archive_title – 15

Files:

  • template-parts/posts/layout-left-sidebar.php
  • template-parts/posts/layout-right-sidebar.php
  • template-parts/posts/layout.php

Back to top

flatsome_before_breadcrumb

Type: action

Files:

  • woocommerce/global/breadcrumb.php
  • inc/integrations/wp-seo/class-wp-seo.php

Back to top

flatsome_before_comments

Type: action

Hooked:

  • flatsome_before_blog_comments – 10

Files:

  • comments.php

Back to top

Type: action

Hooked:

  • flatsome_html_before_footer – 10

Files:

  • template-parts/footer/footer.php

Back to top

flatsome_before_header

Type: action

Files:

  • header.php

Back to top

flatsome_before_page

Type: action

Hooked:

  • flatsome_page_passord_required_top – -99
  • flatsome_page_top_excerpt – 20

Files:

  • page-blank-sub-nav-vertical.php
  • page-blank-title-center.php
  • page-transparent-header-light.php
  • page-right-sidebar.php
  • page-single-page-nav.php
  • single-blocks.php
  • page-blank-landingpage.php
  • page-blank.php
  • page-my-account.php
  • page-left-sidebar.php
  • page-transparent-header.php
  • page.php
  • page-single-page-nav-transparent.php
  • page-header-on-scroll.php
  • page-single-page-nav-transparent-light.php

Back to top

flatsome_before_page_content

Type: action

Files:

  • page.php

Back to top

flatsome_before_product_images

Type: action

Files:

  • woocommerce/single-product/product-image-stacked.php
  • woocommerce/single-product/product-image-wide.php
  • woocommerce/single-product/product-image.php
  • woocommerce/single-product/product-image-vertical.php

Back to top

flatsome_before_product_page

Type: action

Hooked:

  • flatsome_product_top_content – 10

Files:

  • woocommerce/single-product.php

Back to top

flatsome_before_product_sidebar

Type: action

Hooked:

  • flatsome_product_nav_sidebar – 0
  • flatsome_product_upsell_sidebar – 1

Files:

  • woocommerce/content-single-product-custom.php
  • woocommerce/single-product/layouts/product-right-sidebar-full.php
  • woocommerce/single-product/layouts/product-left-sidebar-small.php
  • woocommerce/single-product/layouts/product.php
  • woocommerce/single-product/layouts/product-left-sidebar.php
  • woocommerce/single-product/layouts/product-stacked-right.php
  • woocommerce/single-product/layouts/product-right-sidebar.php
  • woocommerce/single-product/layouts/product-no-sidebar.php
  • woocommerce/single-product/layouts/product-left-sidebar-full.php

Back to top

flatsome_before_single_product_custom

Type: action

Hooked:

  • flatsome_single_product_custom_structured_data – 10

Files:

  • woocommerce/content-single-product-custom.php

Since: 3.12.0

Back to top

flatsome_blog_post_after

Type: action

Files:

  • inc/shortcodes/blog_posts.php

Back to top

flatsome_blog_post_before

Type: action

Files:

  • inc/shortcodes/blog_posts.php

Back to top

flatsome_breadcrumb

Type: action

Hooked:

  • woocommerce_breadcrumb – 20

Files:

  • inc/functions/fl-template-functions.php

Back to top

flatsome_cart_sidebar

Type: action

Hooked:

  • flatsome_html_cart_sidebar – 10

Files:

  • woocommerce/cart/cart.php
  • template-parts/header/partials/element-cart-mobile.php
  • template-parts/header/partials/element-cart.php

Back to top

flatsome_category_title

Type: action

Hooked:

  • flatsome_category_title – 1
  • flatsome_shop_loop_tools_breadcrumbs – 10
  • flatsome_add_category_filter_button – 20

Files:

  • woocommerce/layouts/headers/category-title-featured.php
  • woocommerce/layouts/headers/category-title-featured-center.php
  • woocommerce/layouts/headers/category-title.php

Back to top

flatsome_category_title_alt

Type: action

Hooked:

  • wc_setup_loop – 10
  • woocommerce_result_count – 20
  • woocommerce_catalog_ordering – 30

Files:

  • woocommerce/layouts/headers/category-title-featured.php
  • woocommerce/layouts/headers/category-title-featured-center.php
  • woocommerce/layouts/headers/category-title.php

Doc: https://docs.uxthemes.com/article/350-woocommerce-shop-page-result-count-and-ordering-dropdown

Back to top

Type: action

Hooked:

  • flatsome_page_footer – 10
  • flatsome_go_to_top – 10

Files:

  • footer.php

Back to top

flatsome_header_background

Type: action

Hooked:

  • flatsome_add_header_backgrounds – 10

Files:

  • template-parts/header/header-wrapper.php

Back to top

flatsome_header_elements

Type: action

Files:

  • inc/structure/structure-header.php

Back to top

flatsome_header_wrapper

Type: action

Files:

  • template-parts/header/header-wrapper.php

Back to top

flatsome_portfolio_title_after

Type: action

Files:

  • template-parts/portfolio/archive-portfolio-title-featured.php
  • template-parts/portfolio/portfolio-title-featured.php

Back to top

flatsome_portfolio_title_left

Type: action

Files:

  • template-parts/portfolio/archive-portfolio-title-featured.php

Back to top

flatsome_portfolio_title_right

Type: action

Files:

  • template-parts/portfolio/archive-portfolio-title-featured.php

Back to top

flatsome_product_box_actions

Type: action

Hooked:

  • flatsome_product_box_actions_add_to_cart – 1
  • flatsome_lightbox_button – 50

Files:

  • woocommerce/content-product.php
  • inc/shortcodes/ux_products.php
  • inc/shortcodes/ux_products.php

Back to top

flatsome_product_box_after

Type: action

Hooked:

  • flatsome_woocommerce_shop_loop_excerpt – 20
  • flatsome_woocommerce_shop_loop_button – 100

Files:

  • woocommerce/content-product.php
  • inc/shortcodes/ux_products.php

Back to top

flatsome_product_box_tools_bottom

Type: action

Files:

  • woocommerce/content-product.php

Back to top

flatsome_product_box_tools_top

Type: action

Hooked:

  • flatsome_product_wishlist_button – 2

Files:

  • woocommerce/content-product.php
  • inc/shortcodes/ux_products.php

Back to top

flatsome_product_image_tools_bottom

Type: action

Hooked:

  • flatsome_product_video_button – 1
  • flatsome_product_lightbox_button – 2

Files:

  • woocommerce/single-product/product-image-wide.php
  • woocommerce/single-product/product-image.php
  • woocommerce/single-product/product-image-vertical.php

Back to top

flatsome_product_image_tools_top

Type: action

Hooked:

  • flatsome_product_wishlist_button – 2

Files:

  • woocommerce/single-product/product-image-default.php
  • woocommerce/single-product/product-image-stacked.php
  • woocommerce/single-product/product-image-wide.php
  • woocommerce/single-product/product-image.php
  • woocommerce/single-product/product-image-vertical.php

Back to top

flatsome_product_title

Type: action

Hooked:

  • flatsome_product_page_title – 10
  • flatsome_product_page_breadcrumbs – 20

Files:

  • woocommerce/single-product/headers/header-product-featured-center.php
  • woocommerce/single-product/headers/header-product-top.php
  • woocommerce/single-product/headers/header-product-featured.php

Back to top

flatsome_product_title_tools

Type: action

Hooked:

  • flatsome_product_title_next_prev – 20

Files:

  • woocommerce/single-product/headers/header-product-featured-center.php
  • woocommerce/single-product/headers/header-product-top.php
  • woocommerce/single-product/headers/header-product-featured.php

Back to top

flatsome_products_after

Type: action

Hooked:

  • flatsome_products_footer_content – 10

Files:

  • woocommerce/layouts/category.php
  • woocommerce/layouts/category-none.php
  • woocommerce/layouts/category-right-sidebar.php
  • woocommerce/layouts/category-off-canvas.php

Back to top

flatsome_products_before

Type: action

Files:

  • woocommerce/layouts/category-none.php
  • woocommerce/layouts/category-right-sidebar.php
  • woocommerce/layouts/category-off-canvas.php

Back to top

flatsome_sale_flash

Type: action

Hooked:

  • woocommerce_show_product_sale_flash – 10

Files:

  • woocommerce/single-product/product-image-default.php
  • woocommerce/single-product/product-image-stacked.php
  • woocommerce/single-product/product-image-wide.php
  • woocommerce/single-product/product-image.php
  • woocommerce/single-product/product-image-vertical.php

Back to top

flatsome_woocommerce_shop_loop_images

Type: action

Hooked:

  • woocommerce_template_loop_product_thumbnail – 10
  • flatsome_woocommerce_get_alt_product_thumbnail – 11

Files:

  • woocommerce/content-product.php

Back to top

flatsome_ajax_search_function

Type: filter

Files:

  • inc/extensions/flatsome-live-search/flatsome-live-search.php
  • inc/extensions/flatsome-live-search/flatsome-live-search.php

Back to top

flatsome_ajax_search_post_type

Type: filter

Files:

  • inc/extensions/flatsome-live-search/flatsome-live-search.php

Back to top

flatsome_ajax_search_products_by_sku_search_query

Type: filter

Files:

  • inc/extensions/flatsome-live-search/flatsome-live-search.php

Back to top

flatsome_ajax_search_products_by_tag_search_query

Type: filter

Files:

  • inc/extensions/flatsome-live-search/flatsome-live-search.php

Back to top

flatsome_ajax_search_products_search_query

Type: filter

Files:

  • inc/extensions/flatsome-live-search/flatsome-live-search.php

Back to top

flatsome_ajax_search_query

Type: filter

Files:

  • inc/extensions/flatsome-live-search/flatsome-live-search.php
  • inc/extensions/flatsome-live-search/flatsome-live-search.php

Back to top

flatsome_attachment_size

Type: filter

Files:

  • image.php

Back to top

flatsome_before_body_close_priority

Type: filter

Files:

  • inc/structure/structure-footer.php

Back to top

flatsome_custom_product_single_product_hooks

Type: filter

Files:

  • inc/builder/shortcodes/custom-product.php

Back to top

flatsome_disable_mini_cart

Type: filter

Files:

  • template-parts/header/partials/element-cart-mobile.php
  • template-parts/header/partials/element-cart.php

Back to top

flatsome_dummy_text

Type: filter

Files:

  • inc/helpers/helpers-frontend.php

Back to top

flatsome_header_class

Type: filter

Files:

  • inc/structure/structure-header.php

Back to top

flatsome_header_element

Type: filter

Files:

  • inc/admin/options/helpers/options-helpers.php

Back to top

flatsome_header_title_class

Type: filter

Files:

  • inc/structure/structure-header.php

Back to top

flatsome_infinite_scroll_params

Type: filter

Files:

  • inc/extensions/flatsome-infinite-scroll/class-flatsome-infinite-scroll.php

Since: 3.6.2

Doc: https://docs.uxthemes.com/article/316-infinite-scroll-disable-history

Back to top

flatsome_lightbox_close_btn_inside

Type: filter

Files:

  • inc/functions/function-setup.php

Since: 3.9.0

Doc: https://docs.uxthemes.com/article/378-lightbox-close-button

Back to top

flatsome_lightbox_close_button

Type: filter

Files:

  • inc/functions/function-setup.php

Since: 3.9.0

Doc: https://docs.uxthemes.com/article/378-lightbox-close-button

Back to top

flatsome_main_class

Type: filter

Files:

  • inc/structure/structure-header.php

Back to top

flatsome_payment_icons

Type: filter

Files:

  • inc/woocommerce/structure-wc-global.php

Since: 3.9.0

Doc: https://docs.uxthemes.com/article/351-paymenticons

Back to top

flatsome_product_block

Type: filter

Files:

  • inc/helpers/helpers-woocommerce.php

Since: 3.12.0

Doc: https://docs.uxthemes.com/article/389-custom-product-page

Back to top

flatsome_product_block_primary_term_id

Type: filter

Files:

  • inc/helpers/helpers-woocommerce.php

Since: 3.12.0

Back to top

flatsome_product_block_product_terms_args

Type: filter

Files:

  • inc/helpers/helpers-woocommerce.php

Since: 3.12.0

Back to top

flatsome_product_labels

Type: filter

Files:

  • woocommerce/single-product/sale-flash.php
  • woocommerce/loop/sale-flash.php

Back to top

flatsome_sidebar_class

Type: filter

Files:

  • inc/structure/structure-sidebars.php

Back to top

flatsome_text_formats

Type: filter

Files:

  • inc/structure/structure-admin.php

Back to top

flatsome_viewport_meta

Type: filter

Files:

  • inc/structure/structure-header.php

Since: 3.9.0

Back to top

flatsome_woocommerce_get_alt_product_thumbnail

Type: filter

Files:

  • inc/woocommerce/structure-wc-product-box.php

Back to top

flatsome_woocommerce_shop_loop_category

Type: filter

Files:

  • inc/woocommerce/structure-wc-product-box.php

Back to top

flatsome_wpseo_breadcrumb_remove_last

Type: filter

Files:

  • inc/integrations/wp-seo/class-wp-seo.php

Back to top


Version: 3.12.1

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x