PluginProbe
Bookit — Booking & Appointment Calendar / 2.6.0.5
Bookit — Booking & Appointment Calendar v2.6.0.5
2.6.0.5 2.6.0.4 2.6.0.3 2.6.0.2 2.6.0.1 2.6.0 trunk 1.2 1.2.2 1.2.3 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 All 62 releases
← All changes | includes/classes/BookitController.php +18 -2 trunk2.6.0.5 View file →
@@ -165,10 +165,26 @@
165 165
166 166 return $result;
167 167 }
168 168
169 + /**
170 + * @since 2.6.0 Prepend a login step for Registered mode when the visitor is logged out.
171 + */
169 172 private static function get_step_naviation() {
170 - $step_navigation = array(
173 + $step_navigation = array();
174 +
175 + $settings = SettingsController::get_settings();
176 + if ( 'registered' == $settings['booking_type'] && ! is_user_logged_in() ) {
177 + $step_navigation[] = array(
178 + 'key' => 'auth',
179 + 'menu' => __( 'Login', 'bookit' ),
180 + 'title' => __( 'Login', 'bookit' ),
181 + 'requiredFields' => array(),
182 + 'validation' => false,
183 + );
184 + }
185 +
186 + $step_navigation = array_merge( $step_navigation, array(
171 187 array(
172 188 'key' => 'category',
173 189 'menu' => __( 'Category', 'bookit' ),
174 190 'title' => __( 'Select Category', 'bookit' ),
@@ -236,9 +252,9 @@
236 252 'key' => 'result',
237 253 'requiredFields' => array(),
238 254 'validation' => false,
239 255 ),
240 - );
256 + ) );
241 257
242 258 return $step_navigation;
243 259 }
244 260