PluginProbe ʕ •ᴥ•ʔ
Microsoft Clarity / 0.10.12
Microsoft Clarity v0.10.12
0.10.26 0.10.25 0.10.24 0.8.0 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 trunk 0.10.0 0.10.1 0.10.10 0.10.11 0.10.12 0.10.13 0.10.14 0.10.15 0.10.16 0.10.17 0.10.18 0.10.19 0.10.2 0.10.20 0.10.21 0.10.22 0.10.23 0.10.3 0.10.4 0.10.5 0.10.6 0.10.7 0.10.8 0.10.9 0.2 0.4 0.5 0.6 0.6.1 0.7 0.7.1 0.7.2 0.7.3 0.7.4 0.7.5
microsoft-clarity / agents.php
microsoft-clarity Last commit date
js 6 months ago LICENSE.txt 5 years ago agents.php 6 months ago clarity-hooks.php 1 year ago clarity-page.php 6 months ago clarity-server-analytics.php 7 months ago clarity.php 6 months ago index.php 5 years ago readme.txt 6 months ago
agents.php
47 lines
1 <?php
2
3 /*******************************************************************************
4 * File with agents helper functions
5 *******************************************************************************/
6
7 /**
8 * Check if script should be injected on current page
9 */
10 function should_inject_brand_agents_script() {
11 // Inject on WooCommerce pages
12 if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) {
13 return true;
14 }
15
16 // Inject on shop page
17 if ( function_exists( 'is_shop' ) && is_shop() ) {
18 return true;
19 }
20
21 // Inject on product pages
22 if ( function_exists( 'is_product' ) && is_product() ) {
23 return true;
24 }
25
26 // Inject on cart page
27 if ( function_exists( 'is_cart' ) && is_cart() ) {
28 return true;
29 }
30
31 // Inject on checkout page
32 if ( function_exists( 'is_checkout' ) && is_checkout() ) {
33 return true;
34 }
35
36 // Inject on account pages
37 if ( function_exists( 'is_account_page' ) && is_account_page() ) {
38 return true;
39 }
40
41 // Inject on homepage if it's the shop
42 if ( is_front_page() && get_option( 'show_on_front' ) === 'page' && get_option( 'page_on_front' ) == wc_get_page_id( 'shop' ) ) {
43 return true;
44 }
45
46 return false;
47 }