|
|
|
@ -400,4 +400,25 @@ add_action('wp_head', function() { |
|
|
|
|
// Рендерим шаблон |
|
|
|
|
\Timber\Timber::render('templates/head-pixel-functions.twig', $context); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_page_type() { |
|
|
|
|
if (is_home() || is_front_page()) { |
|
|
|
|
return 'home'; |
|
|
|
|
} elseif (is_shop()) { |
|
|
|
|
return 'shop'; |
|
|
|
|
} elseif (is_product_category()) { |
|
|
|
|
return 'category'; |
|
|
|
|
} elseif (is_product_tag()) { |
|
|
|
|
return 'tag'; |
|
|
|
|
} elseif (is_search()) { |
|
|
|
|
return 'search'; |
|
|
|
|
} elseif (is_cart()) { |
|
|
|
|
return 'cart'; |
|
|
|
|
} elseif (is_account_page()) { |
|
|
|
|
return 'account'; |
|
|
|
|
} else { |
|
|
|
|
return 'other'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|