| @@ -9,13 +9,29 @@ | ||
| 9 | 9 | * |
| 10 | 10 | * @modified 2024-09-06 |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| 14 | - | |
| 15 | - | |
| 16 | -/** | |
| 17 | - * Do we need to start 'Setup Wizard' ? | |
| 13 | +if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| 14 | + | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * Check whether this site was initialized by the current first-install flow. | |
| 18 | + * | |
| 19 | + * This persisted marker is intentionally separate from wizard completion and | |
| 20 | + * prompt dismissal. It prevents plugin updates from adding the native Setup menu | |
| 21 | + * while allowing a new administrator to postpone the popup and return through | |
| 22 | + * that menu later. | |
| 23 | + * | |
| 24 | + * @return bool True for sites marked during genuine first installation. | |
| 25 | + */ | |
| 26 | +function wpbc_setup_wizard_is_initial_install_site() { | |
| 27 | + | |
| 28 | + return 'On' === get_bk_option( 'booking_setup_wizard_initial_install' ); | |
| 29 | +} | |
| 30 | + | |
| 31 | + | |
| 32 | +/** | |
| 33 | + * Do we need to start 'Setup Wizard' ? | |
| 18 | 34 | * |
| 19 | 35 | * @return bool |
| 20 | 36 | */ |
| 21 | 37 | function wpbc_setup_wizard_page__is_need_start(){ |