$template_context Authorized step context. */ if ( ! defined( 'ABSPATH' ) ) { exit; } $step_data = isset( $template_context['step_data'] ) && is_array( $template_context['step_data'] ) ? $template_context['step_data'] : array(); $can_manage = ! empty( $step_data['can_manage'] ); $has_resources = ! empty( $step_data['has_resources'] ); $resources = isset( $step_data['resources'] ) && is_array( $step_data['resources'] ) ? $step_data['resources'] : array(); $apply_options = isset( $step_data['apply_options'] ) && is_array( $step_data['apply_options'] ) ? $step_data['apply_options'] : array(); $ranges = isset( $step_data['ranges'] ) && is_array( $step_data['ranges'] ) ? $step_data['ranges'] : array(); $first_date = isset( $step_data['default_first_date'] ) ? (string) $step_data['default_first_date'] : ''; $last_date = isset( $step_data['default_last_date'] ) ? (string) $step_data['default_last_date'] : ''; $initial_state = wp_json_encode( $step_data, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ); $initial_state = false === $initial_state ? '{}' : $initial_state; $staged_values = isset( $template_context['values']['days_off'] ) && is_array( $template_context['values']['days_off'] ) ? $template_context['values']['days_off'] : array( 'revision' => isset( $step_data['revision'] ) ? (string) $step_data['revision'] : '', 'unavailable_dates' => isset( $step_data['unavailable_dates'] ) && is_array( $step_data['unavailable_dates'] ) ? $step_data['unavailable_dates'] : array(), ); $staged_json = wp_json_encode( $staged_values ); $staged_json = false === $staged_json ? '{"revision":"","unavailable_dates":{}}' : $staged_json; $is_aggregate_scope = ! empty( $step_data['is_aggregate_scope'] ); $aggregate_legend_html = ''; $resource_legend_html = ''; if ( function_exists( 'wpbc_get_calendar_legend__content_html' ) && ! empty( $resources ) ) { $aggregate_legend_html = wpbc_get_calendar_legend__content_html( array( 'is_vertical' => false, 'text_for_day_cell' => gmdate( 'd' ), 'items' => array( 'available', 'resource_unavailable', 'resources_partially_unavailable', 'resources_have_bookings' ), 'unavailable_day_cell_tag' => 'a', 'resource_id' => absint( $resources[0]['id'] ), 'titles' => array( 'available' => __( 'Available', 'booking' ), 'resource_unavailable' => __( 'Unavailable', 'booking' ), 'resources_partially_unavailable' => __( 'Some booking items unavailable', 'booking' ), 'resources_have_bookings' => __( 'Bookings exist for one or more booking items', 'booking' ), ), ) ); $resource_legend_html = wpbc_get_calendar_legend__content_html( array( 'is_vertical' => false, 'text_for_day_cell' => gmdate( 'd' ), 'items' => array( 'available', 'resource_unavailable', 'approved', 'pending', 'partially' ), 'unavailable_day_cell_tag' => 'a', 'resource_id' => absint( $resources[0]['id'] ), 'titles' => array( 'available' => __( 'Available', 'booking' ), 'resource_unavailable' => __( 'Unavailable', 'booking' ), 'approved' => __( 'Approved booking', 'booking' ), 'pending' => __( 'Pending booking', 'booking' ), 'partially' => __( 'Partially booked', 'booking' ), ), ) ); } ?>

render( 'settings-hint', array( 'settings_hint' => $template_context['settings_hint'] ) ); ?>
hidden>
hidden>

hidden>