array( 'now' => __( 'Now', 'booking' ) , 'today' => __( '00:00 Today', 'booking' ) , 'week' => __( 'End of current week', 'booking' ) , 'month-start' => __( 'Start of current month', 'booking' ) , 'month-end' => __( 'End of current month', 'booking' ) , 'year-end' => __( 'End of current year', 'booking' ) , 'any' => __( 'The end of time', 'booking' ) , 'date' => __( 'Specific date / time', 'booking' ) ) , 'value' => 'any' , 'title' => __('Until', 'booking') ) ); ?>
‹ ›
__('Import Events (.ics feed)', 'booking') , 'text_css' => 'line-height: 18px;vertical-align: text-top;' // , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' ) , 'onclick' => $js . "jQuery('.wpbc_sc_container__shortcode_" . $shortcode_name . " .wpbc_sc_container__shortcode_section__general').show();" , 'font_icon' => 'menu_icon icon-1x wpbc-bi-box-arrow-in-down-right' , 'default' => true ) ); wpbc_bs_display_tab( array( 'title' => __('Advanced', 'booking') // , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' ) , 'onclick' => $js . "jQuery('.wpbc_sc_container__shortcode_" . $shortcode_name . " .wpbc_sc_container__shortcode_section__other').show();" , 'font_icon' => 'wpbc_icn_tune' , 'default' => false ) ); wpbc_bs_toolbar_tabs_html_container_end(); } // ===================================================================================================================== // Fields // ===================================================================================================================== /** * Shortcode Field: Header in search results: '{searchresults} Result(s) Found' * * @param $id * @param $group_key * * @return void */ function wpbc_shortcode_config_fields__booking_ics_import__url ($id , $group_key ){ WPBC_Settings_API::field_text_row_static( $id , array( 'type' => 'text' , 'placeholder' => __( 'Example', 'booking' ). ': ' . 'https://calendar.google.com/calendar/ical/CALENDAR_ID/public/basic.ics' , 'title' => __( 'URL to .ICS Feed', 'booking' ) //URL to .ICS Feed , 'description' => sprintf( __( 'Enter the url of .ics feed or file.', 'booking' ) , '{searchresults}' ) , 'description_tag' => 'span' , 'label' => '' , 'class' => '' , 'css' => 'width:99%;' , 'group' => $group_key , 'tr_class' => $group_key . '_standard_section ' , 'only_field' => false , 'attr' => array() , 'value' => '' ) ); } /** * Shortcode Fields: "From" | "Until" * * @param $id * @param $group_key * * @return void */ function wpbc_shortcode_config_fields__booking_ics_import__from_until( $id , $group_key , $options = array() ){ $defaults = array( 'options' => array( 'now' => __( 'Now', 'booking' ) , 'today' => __( '00:00 Today', 'booking' ) , 'week' => __( 'Start of current week', 'booking' ) , 'month-start' => __( 'Start of current month', 'booking' ) , 'month-end' => __( 'End of current month', 'booking' ) , 'year-start' => __( 'Start of current year', 'booking' ) , 'any' => __( 'The start of time', 'booking' ) , 'date' => __( 'Specific date / time', 'booking' ) ) , 'value' => 'today' , 'title' => __('From', 'booking') ); $options = wp_parse_args( $options, $defaults ); ?>
'select' , 'title' => $options['title'] , 'description' => '' , 'description_tag' => 'span' , 'label' => '' , 'multiple' => false , 'group' => $group_key , 'tr_class' => $group_key . '_standard_section ' , 'class' => '' , 'css' => 'margin-right:10px;' , 'only_field' => true , 'attr' => array() , 'value' => $options['value'] , 'options' => $options['options'] ) ); ?> 'text' , 'title' => __('Offset', 'booking' ) , 'placeholder' => '' , 'description' => '' , 'description_tag' => 'span' , 'group' => $group_key , 'tr_class' => $group_key . '_standard_section ' , 'class' => '' , 'css' => 'width:7em;' , 'only_field' => true , 'attr' => array() , 'value' => '' ) ); WPBC_Settings_API::field_select_row_static( $id . '_offset_type' , array( 'type' => 'select' , 'title' => '' , 'description' => '' , 'description_tag' => 'span' , 'label' => '' , 'multiple' => false , 'group' => $group_key , 'tr_class' => $group_key . '_standard_section ' , 'class' => $id . '_offset_label' , 'css' => 'width:6em;' , 'only_field' => true , 'attr' => array() , 'value' => 'day', 'options' => array( 'day' => __( 'days', 'booking' ), 'hour' => __( 'hours', 'booking' ), 'minute' => __( 'minutes', 'booking' ), 'second' => __( 'seconds', 'booking' ) ) ) ); ?>
'select' , 'title' => __( 'Import condition', 'booking' ) , 'description' => __( 'Whether import events for dates, that already booked in specific booking resource', 'booking' ) , 'description_tag' => 'span' , 'label' => '' , 'multiple' => false , 'group' => $group_key , 'tr_class' => $group_key . '_standard_section' , 'class' => '' , 'css' => 'margin-right:10px;' , 'only_field' => false , 'attr' => array() , 'value' => '' , 'options' => array( '' => __( 'Import in any case', 'booking' ) , 'if_dates_free' => __( 'Import only, if days are available', 'booking' ) ) ) ); } /** * Shortcode Field: Select-box - "Import Conditions" * * @param $id * @param $group_key * * @return void */ function wpbc_shortcode_config_fields__booking_ics_import__conditions_events( $id , $group_key ){ WPBC_Settings_API::field_select_row_static( $id , array( 'type' => 'select' , 'title' => __( 'Event condition', 'booking' ) , 'description' => __( 'Import booking, if all dates or only some date(s) within conditional parameters from / until', 'booking' ) , 'description_tag' => 'span' , 'label' => '' , 'multiple' => false , 'group' => $group_key , 'tr_class' => $group_key . '_standard_section' , 'class' => '' , 'css' => 'margin-right:10px;' , 'only_field' => false , 'attr' => array() , 'value' => '1' , 'options' => array( '0' => __( 'Some date(s) in conditional interval', 'booking' ) , '1' => __( 'Strict. All dates in conditional interval', 'booking' ) ) ) ); } /** * Shortcode Field: Select-box - "Max Number" * * @param $id * @param $group_key * * @return void */ function wpbc_shortcode_config_fields__booking_ics_import__conditions_max_num( $id , $group_key ){ WPBC_Settings_API::field_select_row_static( $id , array( 'type' => 'select' , 'title' => __( 'Maximum number', 'booking' ) , 'description' => __( 'You can specify the maximum number of events.', 'booking' ) , 'description_tag' => 'span' , 'label' => '' , 'multiple' => false , 'group' => $group_key , 'tr_class' => $group_key . '_standard_section' , 'class' => '' , 'css' => 'margin-right:10px;' , 'only_field' => false , 'attr' => array() , 'value' => 0 , 'options' => array_combine( array_merge( array( '0' ), range( 500, 10 , 10 ) ) , array_merge( array( ' - ' ), range( 500, 10 , 10 ) ) ) ) ); } /** * Shortcode Field: Select-box - "silence" * * @param $id * @param $group_key * * @return void */ function wpbc_shortcode_config_fields__booking_ics_import__silence( $id , $group_key ){ WPBC_Settings_API::field_select_row_static( $id , array( 'type' => 'select' , 'title' => __( 'Display Import Status', 'booking' ) , 'description' => ''//__( 'You can specify the maximum number of events.', 'booking' ) , 'description_tag' => 'span' , 'label' => '' , 'multiple' => false , 'group' => $group_key , 'tr_class' => $group_key . '_standard_section' , 'class' => '' , 'css' => 'margin-right:10px;' , 'only_field' => false , 'attr' => array() , 'value' => 0 , 'options' => array( '' => __( 'Show the number of imported bookings', 'booking' ) , '1' => __( 'Do not display any messages regarding the import', 'booking' ) ) ) ); }