= count( $homes ) ) { $selected_home_index = 0; } // Create step vars $selected_file = ltrim( (string) get_option( 'bongoto_shop_selected_home_file', '' ), '/' ); $created_id = (int) get_option( 'bongoto_shop_last_created_home_id', 0 ); $created_ok = ( $created_id > 0 && get_post_status( $created_id ) ); $local = ( $selected_file && function_exists( 'bongoto_shop_local_demo_file' ) ) ? bongoto_shop_local_demo_file( $selected_file ) : ''; $has_import = ( $local && file_exists( $local ) && filesize( $local ) > 0 ); $create_url = wp_nonce_url( admin_url( 'admin-post.php?action=bongoto_shop_create_pro_home' ), 'bongoto_shop_create_pro_home' ); // ✅ Home created হলে পুরনো "Demo import successful..." notice hide if ( $created_ok ) { $notice = ''; } // Step states $step1_done = (bool) $active; $step2_done = (bool) $has_import; $step3_done = (bool) $created_ok; $step4_done = (bool) $created_ok; // Which step to show (via URL hash + JS). Default = next step. $default_step = 2; if ( $step2_done ) { $default_step = 3; } if ( $step3_done ) { $default_step = 4; } ?>

Go to Purchase Code', 'bongoto-shop' ), $purchase_url ) ); ?>

1. 2. 3. 4.
2

2.1

$h ) : $n = ! empty( $h['name'] ) ? (string) $h['name'] : ( 'Home ' . ( (int) $i + 1 ) ); $f = ! empty( $h['file'] ) ? (string) $h['file'] : ''; $img = ''; if ( is_array( $h ) ) { if ( ! empty( $h['preview'] ) ) { $img = (string) $h['preview']; } elseif ( ! empty( $h['image'] ) ) { $img = (string) $h['image']; } elseif ( ! empty( $h['thumbnail'] ) ) { $img = (string) $h['thumbnail']; } } if ( $img && $manifest_base && ! preg_match( '#^https?://#i', $img ) ) { $img = $manifest_base . ltrim( $img, '/' ); } ?>
2.2

$c ) : $n = ! empty( $c['name'] ) ? (string) $c['name'] : ( 'Colors ' . ( (int) $i + 1 ) ); $f = ! empty( $c['file'] ) ? (string) $c['file'] : ''; $swatches = ( isset( $c['swatches'] ) && is_array( $c['swatches'] ) ) ? $c['swatches'] : array(); ?>