db__is_all_steps_completed(); return $is_all_steps_completed; } /** * Is user can access Wizard Setup page ? * @return bool */ function wpbc_is_user_can_access_wizard_page() { $is_user_can_access_wizard_page = true; if ( class_exists( 'wpdev_bk_multiuser' ) ) { $real_current_user_id = get_current_user_id(); // Is current user suer booking admin and if this user was simulated log in $is_user_super_admin = apply_bk_filter( 'is_user_super_admin', $real_current_user_id ); if ( ! $is_user_super_admin ) { $is_user_can_access_wizard_page = false; } } return $is_user_can_access_wizard_page; } // ===================================================================================================================== // == Shortcodes Content == // ===================================================================================================================== /** * Get "Booking Form" Shortcode Content * * @param $resource_id * * @return false|string */ function wpbc_setup_wizard_page__get_shortcode_html( $resource_id = 1 , $is_show_only_calendar = false ) { ob_start(); $localized_js_vars_script = wpbc_get_localized_js_vars(); if ( $is_show_only_calendar ) { // Center calendar. ?>
: Settings > Availability'; ?>
__( 'General Info', 'booking' ), 'icon' => 'wpbc_icn_check wpbc_icn_dashboard0 wpbc_icn_task_alt0 0wpbc_icn_circle_outline', 'class' => '', //'style' => 'cursor:not-allowed;', //'a_style' => 'pointer-events: none;', 'action' => "wpbc_ajx__setup_wizard_page__send_request_with_params( { 'current_step':'general_info' } );" ,'right_icon' => array( 'icon' => '', 'text' => __('Done', 'booking'), 'action' => "console.log( this );", ) ); $navigation_menu_arr['optional_other_settings'] = array( 'title' => __( 'Bookings Type', 'booking' ), 'icon' => 'wpbc-bi-calendar2-range 0wpbc_icn_radio_button_checked', 'class' => '', //'a_style' => 'color: var(--wpbc_settings__nav_menu_left__active_border_color);', 'action' => "wpbc_ajx__setup_wizard_page__send_request_with_params( { 'current_step':'optional_other_settings' } );" ); $navigation_menu_arr['next_step'] = array( 'title' => '',//__( 'Bookings Type', 'booking' ), 'icon' => 'wpbc-bi-three-dots 0wpbc_icn_radio_button_unchecked', 'class' => '', 'a_style' => 'pointer-events: none;cursor:not-allowed;', 'action' => "wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" ); // $navigation_menu_arr['booking_notification'] = array( // 'title' => __( 'Publishing', 'booking' ), // 'icon' => 'wpbc-bi-calendar2-range', // 'class' => 'wpbc_top_border', // 'action' => "wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );", // 'right_icon' => array( // 'icon' => 'wpbc_icn_navigate_next expand_more', // 'action' => "console.log( this );", // ) // ); // $navigation_menu_arr['booking_form'] = array( // 'title' => __( 'Booking Form', 'booking' ), // 'icon' => 'wpbc_icn_dashboard', // 'class' => 'wpbc_sub_option', // 'action' => "wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" // ); return $navigation_menu_arr; } /** * Show Warning Conflict with "Wordfence" plugin * * @return void */ function wpbc_maybe_show_warning_conflict__wordfence( $style = '' ) { if ( class_exists( 'wordfence' ) ) { $is_panel_visible = wpbc_is_dismissed_panel_visible( 'wpbc_show_warning_wordfence' ); // FixIn: 9.9.0.8. if ( $is_panel_visible ) { ?>
' . esc_html__('Important!' ,'booking') . ' ' ; // FixIn: 10.9.1.1. /* translators: 1: ... */ echo wp_kses_post( sprintf( __( 'We detect that you use %s plugin.', 'booking' ), 'Wordfence' ) ); echo '
'; /* translators: 1: ... */ echo wp_kses_post( sprintf( __( 'If you encounter any issues, follow this %1$stroubleshooting instruction%2$s.', 'booking' ), '', '' ) ); ?>
' ', 'hint' => __( 'Dismiss', 'booking' ), 'class' => 'wpbc_panel_get_started_dismiss', 'css' => 'background: #fff;border-radius: 7px;' )); $dismiss_x_button = ob_get_clean(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo wpbc_replace__js_scripts__to__tpl_scripts( $dismiss_x_button ); ?>
/i'; $calendar_html_content = preg_replace( $pattern, '', $calendar_html_content ); $pattern = '/<\/script>/i'; $calendar_html_content = preg_replace( $pattern, '', $calendar_html_content ); return $calendar_html_content; }