/** * Determines if the current request is for any shopp smart collection, product taxonomy term, or search collection * * NOTE: This function will not identify PHP loaded collections, it only * compares the page request, meaning using is_shopp_collection on the catalog landing * page, even when the landing page (catalog.php) template loads the CatalogProducts collection * will return false, because CatalogProducts is loaded in the template and not directly * from the request. * * @api * @since 1.2 * * @param WP_Query $wp_query (optional) will use the global wp_query by default if false, or the WP_Query object to evaluation * @return boolean **/ function is_shopp_collection($wp_query = false) { return is_shopp_smart_collection($wp_query) || is_shopp_taxonomy($wp_query) || is_shopp_search($wp_query); }
/** * Checks if the current page is a taxonomy page * * @api `shopp('storefront.is-taxonomy')` * @since 1.1 * * @param string $result The output * @param array $options The options * @param ShoppStorefront $O The working object * @return bool True if it is the taxonomy page, false otherwise **/ public static function is_taxonomy($result, $options, $O) { return is_shopp_taxonomy(); }