BSF_UTM_Analytics::is_valid_bsf_product_slug( string $slug )
This function will help to determine if provided slug is a valid bsf product or not, This way we will maintain consistency through out all our products.
Description
Parameters
- $slug
-
(string) (Required) unique slug of the product which can be used for referer, product.
Return
(boolean)
Source
File: inc/lib/bsf-analytics/modules/utm-analytics.php
public static function is_valid_bsf_product_slug( $slug ) {
if ( empty( $slug ) || ! is_string( $slug ) ) {
return false;
}
return in_array( $slug, self::$bsf_product_slugs, true );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.1.10 | Introduced. |