sfw_create_request_url( 'shops', $spreadshirt_id ), 'filter' => 'shop', 'expire' => WEEK_IN_SECONDS, 'cache' => $cache, 'flush' => $flush_cache, 'transmit_errors' => $transmit_errors )); // make sure we don't load the wrong data from the options cache. this // is in case the shop id changed if( $cache && !$flush_cache && is_spreadshirt_object( $data ) && $data->id != $spreadshirt_id ) return sfw_get_shop( $spreadshirt_id, true ); return $data; } /** * Retrieve a Shop Id * * This is an alias of sfw_get_activated_shop_id() * * @see sfw_get_activated_shop_id * * @since 1.0.0 */ function sfw_get_shop_id( $placeholder = false ) { return sfw_get_activated_shop_id(); } /** * Echo the Shop Id * * @see sfw_get_shop_id * * @since 1.0.0 */ function sfw_shop_id() { echo sfw_get_shop_id(); } /** * Check if the current host is Spreadshirt.net * * @return bool * * @since 1.0.0 */ function sfw_is_net() : bool { return sfw_get_host() === 'net'; } /** * Check if the current host is Spreadshirt.com * * @return bool * * @since 1.0.0 */ function sfw_is_com() : bool { return sfw_get_host() === 'com'; } /** * Returns one of two values depending on the cvrrent host * * @param mixed $net The value that should be returned for Spreadshirt.net * @param mixed $com The value that should be returned for Spreadshirt.com * * @return mixed One of the given values * * @since 1.0.0 */ function sfw_net_or_com( $net, $com ) { return sfw_is_net() ? $net : $com; }