| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Page Structure in Admin Panel |
| 4 | 4 | * |
| @@ -91,11 +91,18 @@ | ||
| 91 | 91 | |
| 92 | 92 | // ------------------------------------------------------------------------------------------------------------- |
| 93 | 93 | // 'Right Sidebar' - By default it shoud be ''. Other options: '', 'min', 'compact', 'max'. |
| 94 | 94 | // ------------------------------------------------------------------------------------------------------------- |
| 95 | - $right_vertical_sidebar__is_show = $this->page_structure_obj->is_use_option__in_subtabs_or_tabs( 'right_vertical_sidebar__is_show' ); | |
| 96 | - $right_vertical_sidebar__default_view_mode = strval( $this->page_structure_obj->is_use_option__in_subtabs_or_tabs( 'right_vertical_sidebar__default_view_mode' ) ); | |
| 97 | - $right_vertical_sidebar__default_view_mode = ( ! empty( $right_vertical_sidebar__default_view_mode ) ) ? $right_vertical_sidebar__default_view_mode . '_right' : $right_vertical_sidebar__default_view_mode; | |
| 95 | + $right_vertical_sidebar__is_show = $this->page_structure_obj->is_use_option__in_subtabs_or_tabs( 'right_vertical_sidebar__is_show' ); | |
| 96 | + $right_vertical_sidebar__default_view_mode = strval( $this->page_structure_obj->is_use_option__in_subtabs_or_tabs( 'right_vertical_sidebar__default_view_mode' ) ); | |
| 97 | + $right_vertical_sidebar__default_view_mode = ( ! empty( $right_vertical_sidebar__default_view_mode ) ) ? $right_vertical_sidebar__default_view_mode . '_right' : $right_vertical_sidebar__default_view_mode; | |
| 98 | + $right_sidebar_content_click_collapse_mode = $this->page_structure_obj->is_use_option__in_subtabs_or_tabs( 'right_vertical_sidebar__content_click_collapse_mode' ); | |
| 99 | + $right_sidebar_content_click_collapse_mode = is_scalar( $right_sidebar_content_click_collapse_mode ) | |
| 100 | + ? sanitize_key( (string) $right_sidebar_content_click_collapse_mode ) | |
| 101 | + : ''; | |
| 102 | + $right_sidebar_content_click_collapse_mode = in_array( $right_sidebar_content_click_collapse_mode, array( 'min', 'compact', 'none' ), true ) | |
| 103 | + ? $right_sidebar_content_click_collapse_mode | |
| 104 | + : ''; | |
| 98 | 105 | |
| 99 | 106 | if ( ! empty( $right_vertical_sidebar__default_view_mode ) ) { |
| 100 | 107 | if ( 'none_right' === $right_vertical_sidebar__default_view_mode ) { |
| 101 | 108 | echo '<script type="text/javascript"> jQuery( document ).ready( function () { if ( "function" === typeof wpbc_admin_ui__sidebar_right__do_hide ) { wpbc_admin_ui__sidebar_right__do_hide(); } } ); </script>'; |
| @@ -131,12 +138,16 @@ | ||
| 131 | 138 | |
| 132 | 139 | // Fires Before showing settings Content page ( for example in setup Wizard for show_top_right_wizard_button ). |
| 133 | 140 | do_action( 'wpbc_after_wpbc_page_top__header_tabs', $this->active_page, $this->active_tab, $this->active_subtab ); |
| 134 | 141 | |
| 135 | - echo '<div class="wpbc_settings_page_wrapper ' . | |
| 136 | - esc_attr( $left_navigation__default_view_mode ) . ' ' . | |
| 137 | - esc_attr( $right_vertical_sidebar__default_view_mode ) . | |
| 138 | - '" data-wpbc-left-sidebar-user-mode="' . esc_attr( $left_navigation__is_user_mode_enabled ? '1' : '0' ) . '">'; | |
| 142 | + echo '<div class="wpbc_settings_page_wrapper ' . | |
| 143 | + esc_attr( $left_navigation__default_view_mode ) . ' ' . | |
| 144 | + esc_attr( $right_vertical_sidebar__default_view_mode ) . | |
| 145 | + '" data-wpbc-left-sidebar-user-mode="' . esc_attr( $left_navigation__is_user_mode_enabled ? '1' : '0' ) . '"' . | |
| 146 | + ( $right_sidebar_content_click_collapse_mode | |
| 147 | + ? ' data-wpbc-right-sidebar-content-click-collapse-mode="' . esc_attr( $right_sidebar_content_click_collapse_mode ) . '"' | |
| 148 | + : '' ) . | |
| 149 | + '>'; | |
| 139 | 150 | |
| 140 | 151 | if ( $left_navigation__is_user_mode_enabled ) { |
| 141 | 152 | $user_cust_option = 'left_sidebar_view_mode'; |
| 142 | 153 | $nonce_action = $user_cust_option . '_nonce_act'; |
| @@ -159,14 +170,34 @@ | ||
| 159 | 170 | 'page_nav_tabs' => $this->page_structure_obj->get_nav_tabs(), |
| 160 | 171 | ) |
| 161 | 172 | ); |
| 162 | 173 | |
| 163 | - ?> | |
| 164 | - <div class="wpbc_settings_page_content"> | |
| 165 | - <div id="<?php echo esc_attr( $this->active_page ); ?>-admin-page" class="wrap wpbc_page wpbc_page_tab__<?php echo esc_attr( $this->active_tab ); ?> wpbc_page_subtab__<?php echo esc_attr( $this->active_subtab ); ?>"> | |
| 174 | + ?> | |
| 175 | + <div class="wpbc_settings_page_content"> | |
| 176 | + <?php | |
| 177 | + // Initialize shared sidebar and page-control tooltips once per request. | |
| 178 | + if ( function_exists( 'wpbc_bs_javascript_tooltips' ) ) { | |
| 179 | + wpbc_bs_javascript_tooltips(); | |
| 180 | + } | |
| 181 | + ?> | |
| 182 | + <div id="<?php echo esc_attr( $this->active_page ); ?>-admin-page" class="wrap wpbc_page wpbc_page_tab__<?php echo esc_attr( $this->active_tab ); ?> wpbc_page_subtab__<?php echo esc_attr( $this->active_subtab ); ?>"> | |
| 166 | 183 | <div class="wpbc_admin_message"></div> |
| 167 | 184 | <div class="wpbc_admin_page"> |
| 168 | - <div id="ajax_working"></div> | |
| 185 | + <div id="ajax_working"> | |
| 186 | + <?php | |
| 187 | + /** | |
| 188 | + * Fires inside the Booking Calendar floating admin-message container. | |
| 189 | + * | |
| 190 | + * Persistent or actionable messages rendered here use the same fixed | |
| 191 | + * top-right presentation as transient Booking Calendar AJAX notices. | |
| 192 | + * | |
| 193 | + * @param string $active_page Current Booking Calendar page slug. | |
| 194 | + * @param string $active_tab Current active tab slug. | |
| 195 | + * @param string $active_subtab Current active subtab slug. | |
| 196 | + */ | |
| 197 | + do_action( 'wpbc_inside_ui__admin_messages', $this->active_page, $this->active_tab, $this->active_subtab ); | |
| 198 | + ?> | |
| 199 | + </div> | |
| 169 | 200 | <div class="clear wpbc_header_margin" style="height:0px;"></div> |
| 170 | 201 | <div id="ajax_respond" class="ajax_respond" style="display:none;"></div> |
| 171 | 202 | <div class="clear"></div> |
| 172 | 203 | <?php |
| @@ -178,11 +209,11 @@ | ||
| 178 | 209 | wpbc_ui_settings__top_path( $this->page_structure_obj ); |
| 179 | 210 | } |
| 180 | 211 | |
| 181 | 212 | $is_show_top_navigation = $this->page_structure_obj->is_use_option__in_subtabs_or_tabs( 'is_show_top_navigation' ); |
| 182 | - if ( $is_show_top_navigation ) { | |
| 183 | - // Top horisonal menu. | |
| 184 | - wpbc_ui__top_horisontal_nav( | |
| 213 | + if ( $is_show_top_navigation ) { | |
| 214 | + // Top horisonal menu. | |
| 215 | + wpbc_ui__top_horisontal_nav( | |
| 185 | 216 | array( |
| 186 | 217 | 'active_page' => $this->active_page, // wpbc-settings. |
| 187 | 218 | 'active_tab' => $this->active_tab, // calendar_appearance. |
| 188 | 219 | 'active_subtab' => $this->active_subtab, // calendar_appearance_skin. |
| @@ -187,12 +218,12 @@ | ||
| 187 | 218 | 'active_tab' => $this->active_tab, // calendar_appearance. |
| 188 | 219 | 'active_subtab' => $this->active_subtab, // calendar_appearance_skin. |
| 189 | 220 | 'page_nav_tabs' => $this->page_structure_obj->get_nav_tabs(), |
| 190 | 221 | ) |
| 191 | - ); | |
| 192 | - } | |
| 193 | - | |
| 194 | - $this->show_title_and_description(); | |
| 222 | + ); | |
| 223 | + } | |
| 224 | + | |
| 225 | + $this->show_title_and_description(); | |
| 195 | 226 | } |
| 196 | 227 | |
| 197 | 228 | |
| 198 | 229 | /** |