// 版本号:每次改代码把这个 +1(例如 v10),保存后会自动清一次全站缓存
if ( ! defined( ‘STR3XYK_HP_VER’ ) ) {
define( ‘STR3XYK_HP_VER’, ‘20261202_v11’ );
}
// Cloudflare 清缓存(可选):在 wp-config.php 加
// define(‘STR3XYK_CF_ZONE’, ‘你的ZoneID’);
// define(‘STR3XYK_CF_TOKEN’, ‘你的APIToken(Zone.Cache Purge 权限)’);
function str3xyk_purge_cloudflare() {
if ( ! defined( ‘STR3XYK_CF_ZONE’ ) || ! defined( ‘STR3XYK_CF_TOKEN’ ) ) {
return;
}
wp_remote_post(
‘https://api.cloudflare.com/client/v4/zones/’ . STR3XYK_CF_ZONE . ‘/purge_cache’,
array(
‘timeout’ => 15,
‘headers’ => array(
‘Authorization’ => ‘Bearer ‘ . STR3XYK_CF_TOKEN,
‘Content-Type’ => ‘application/json’,
),
‘body’ => wp_json_encode( array( ‘purge_everything’ => true ) ),
)
);
}
// 把能清的全部清一遍
function str3xyk_purge_everything() {
if ( defined( ‘LSCWP_V’ ) ) {
do_action( ‘litespeed_purge_all’ );
}
if ( function_exists( ‘rocket_clean_domain’ ) ) {
rocket_clean_domain();
}
if ( function_exists( ‘w3tc_flush_all’ ) ) {
w3tc_flush_all();
}
if ( function_exists( ‘sg_cachepress_purge_cache’ ) ) {
sg_cachepress_purge_cache();
}
if ( function_exists( ‘wpfc_clear_all_cache’ ) ) {
wpfc_clear_all_cache( true );
}
if ( function_exists( ‘wp_cache_clear_cache’ ) ) {
wp_cache_clear_cache();
}
wp_cache_flush();
str3xyk_purge_cloudflare();
}
// 版本号变化时自动清一次(只跑一次,不影响前台速度)
add_action( ‘plugins_loaded’, ‘str3xyk_maybe_purge_on_version_change’, 20 );
function str3xyk_maybe_purge_on_version_change() {
if ( get_option( ‘str3xyk_homepage_ver’ ) === STR3XYK_HP_VER ) {
return;
}
update_option( ‘str3xyk_homepage_ver’, STR3XYK_HP_VER );
str3xyk_purge_everything();
}
// 管理员手动强清:任意页面地址后加 ?str3xyk_purge=1
add_action( ‘template_redirect’, ‘str3xyk_manual_purge_endpoint’, 1 );
function str3xyk_manual_purge_endpoint() {
if ( empty( $_GET[‘str3xyk_purge’] ) || ! current_user_can( ‘manage_options’ ) ) {
return;
}
update_option( ‘str3xyk_homepage_ver’, STR3XYK_HP_VER );
str3xyk_purge_everything();
wp_die(
‘已清空缓存。当前版本:’ . esc_html( STR3XYK_HP_VER ) . ‘
请用无痕窗口确认访客看到的内容。’,
‘terbys 缓存已清除’,
array( ‘response’ => 200 )
);
}
// 注册短代码
Curated Streetwear.
Zero Guesswork.
Discover top-tier replica finds from vetted sellers with transparent pricing and one-click agent checkout.
Curated Selection
Handpicked reps from vetted, reliable sellers.
Direct Pricing
No middleman markups, always transparent.
Instant Agent Link
Open any find directly on your shopping agent.
Community Backed
Join Discord & WhatsApp support anytime.
Latest Products
How It Works
Go from browsing to your doorstep in three clean steps
Pick Your Finds
Search by name or filter by category to browse verified items at direct-source prices.
Open on Your Agent
Click any product card to launch the exact listing safely with our trusted agent partners.
QC & Save $200
Review QC photos in your warehouse and apply our exclusive BBDBUY coupon before shipping.
add_shortcode( ‘homepage’, ‘render_custom_homepage’ );
function render_custom_homepage() {
// 禁止整页缓存:保证访客看到的永远是最新代码(弹窗、商品都一致)
if ( ! defined( ‘DONOTCACHEPAGE’ ) ) {
define( ‘DONOTCACHEPAGE’, true );
}
do_action( ‘litespeed_control_set_nocache’, ‘str3xyk homepage dynamic’ );
ob_start();
/* =========================================================================
* 自定义 Spotlight Finds 展示区(最多 6 个;两个都留空则自动从各分类抽取)
* 方式 A:填入 WooCommerce 商品 ID,例如 array( 101, 205, 309, 412, 518, 620 )
* ========================================================================= */
$custom_spotlight_ids = array();
/* =========================================================================
* 方式 B:完全自定义标题、分类、价格、图片和任意链接(优先级高于方式 A)
* 需要自定义时,把下面的 /* 和 *\/ 删掉并改成你的内容即可
* ========================================================================= */
$custom_spotlight_cards = array(
/*
array(
‘title’ => ‘Dior Down Jacket’,
‘category’ => ‘Puffers’,
‘price’ => ‘$99.00’,
‘image’ => ‘https://terbys.fr/wp-content/uploads/example.jpg’,
‘link’ => ‘https://www.bbdbuy.com/register?inviteCode=YxQwJp’,
),
*/
);
$current_currency = ‘USD’;
if ( function_exists( ‘wcml_get_multi_currency’ ) ) {
global $woocommerce_wpml;
if ( $woocommerce_wpml && isset( $woocommerce_wpml->multi_currency ) ) {
$current_currency = $woocommerce_wpml->multi_currency->get_client_currency();
}
}
$args = array(
‘post_type’ => ‘product’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘product_type’,
‘field’ => ‘slug’,
‘terms’ => ‘external’,
),
),
);
$products_query = new WP_Query( $args );
$products_data = array();
$products_by_id = array();
while ( $products_query->have_posts() ) : $products_query->the_post();
$product_id = get_the_ID();
$product = wc_get_product( $product_id );
if ( ! $product || ! is_a( $product, ‘WC_Product’ ) ) continue;
$external_url = $product->get_product_url();
$button_text = $product->get_button_text();
if ( empty( $external_url ) ) continue;
$cats = wp_get_post_terms( $product_id, ‘product_cat’, array( ‘fields’ => ‘names’ ) );
$cat_name = ( ! is_wp_error( $cats ) && ! empty( $cats ) ) ? $cats[0] : ‘Uncategorized’;
$image_id = get_post_thumbnail_id( $product_id );
$image_url = $image_id ? wp_get_attachment_image_url( $image_id, ‘woocommerce_single’ ) : wc_placeholder_img_src();
$raw_price = $product->get_price();
if ( function_exists( ‘wcml_price’ ) ) {
$price_formatted = wcml_price( $raw_price, $current_currency );
} else {
$price_formatted = wc_price( $raw_price );
}
$item_arr = array(
‘id’ => $product_id,
‘title’ => get_the_title(),
‘category’ => $cat_name,
‘price_numeric’ => floatval( $raw_price ),
‘price_display’ => $price_formatted,
‘image’ => $image_url,
‘link’ => $external_url,
‘btn_text’ => $button_text ?: ‘Eastmallbuy’,
);
$products_data[] = $item_arr;
$products_by_id[ $product_id ] = $item_arr;
endwhile;
wp_reset_postdata();
$placeholder_img = wc_placeholder_img_src();
$total_count = count( $products_data );
$spotlight_items = array();
if ( ! empty( $custom_spotlight_cards ) ) {
foreach ( array_slice( $custom_spotlight_cards, 0, 6 ) as $card ) {
$spotlight_items[] = array(
‘id’ => 0,
‘title’ => isset( $card[‘title’] ) ? $card[‘title’] : ”,
‘category’ => isset( $card[‘category’] ) ? $card[‘category’] : ‘Featured’,
‘price_display’ => isset( $card[‘price’] ) ? esc_html( $card[‘price’] ) : ”,
‘image’ => ! empty( $card[‘image’] ) ? $card[‘image’] : $placeholder_img,
‘link’ => ! empty( $card[‘link’] ) ? $card[‘link’] : ‘#catalog’,
);
}
} elseif ( ! empty( $custom_spotlight_ids ) ) {
foreach ( $custom_spotlight_ids as $sid ) {
$sid = intval( $sid );
if ( isset( $products_by_id[ $sid ] ) ) {
$spotlight_items[] = $products_by_id[ $sid ];
}
if ( count( $spotlight_items ) >= 6 ) break;
}
}
if ( empty( $spotlight_items ) && ! empty( $products_data ) ) {
$seen_cats = array();
foreach ( $products_data as $item ) {
if ( count( $spotlight_items ) >= 6 ) break;
if ( ! empty( $item[‘image’] ) && ! isset( $seen_cats[ $item[‘category’] ] ) ) {
$seen_cats[ $item[‘category’] ] = true;
$spotlight_items[] = $item;
}
}
foreach ( $products_data as $item ) {
if ( count( $spotlight_items ) >= 6 ) break;
$already = false;
foreach ( $spotlight_items as $s_item ) {
if ( $s_item[‘id’] === $item[‘id’] ) {
$already = true;
break;
}
}
if ( ! $already ) {
$spotlight_items[] = $item;
}
}
}
$GLOBALS[‘str3xyk_homepage_footer_data’] = array(
‘products’ => $products_data,
‘placeholder’ => $placeholder_img,
);
?>
+ Verified Finds • Updated 2026
Curated Streetwear.
Zero Guesswork.
Discover top-tier replica finds from vetted sellers with transparent pricing and one-click agent checkout.
Curated Selection
Handpicked reps from vetted, reliable sellers.
Direct Pricing
No middleman markups, always transparent.
Instant Agent Link
Open any find directly on your shopping agent.
Community Backed
Join Discord & WhatsApp support anytime.
Latest Products
How It Works
Go from browsing to your doorstep in three clean steps
01
Pick Your Finds
Search by name or filter by category to browse verified items at direct-source prices.
02
Open on Your Agent
Click any product card to launch the exact listing safely with our trusted agent partners.
03
QC & Save $200
Review QC photos in your warehouse and apply our exclusive BBDBUY coupon before shipping.