is_service_active(); $hide_upsell = defined( 'TRIBE_HIDE_UPSELL' ); if ( 'edit' === $aggregator_action ) { $default_post_status = get_post_meta( $record->post->ID, Tribe__Events__Aggregator__Record__Abstract::$meta_key_prefix . 'post_status', true ); $default_category = get_post_meta( $record->post->ID, Tribe__Events__Aggregator__Record__Abstract::$meta_key_prefix . 'category', true ); } // Set up the generic default post statuses and category. $default_post_status = empty( $default_post_status ) ? tribe_get_option( 'tribe_aggregator_default_post_status', 'draft' ) : $default_post_status; $default_category = empty( $default_category ) ? tribe_get_option( 'tribe_aggregator_default_category', '' ) : $default_category; $post_statuses = get_post_statuses(); // Ensure the "(do not override)" status is set up for Eventbrite imports, and "Published" is removed. $do_not_override_status = [ 'do_not_override' => esc_html__( '(do not override)', 'the-events-calendar' ) ]; $eventbrite_post_statuses = $do_not_override_status + $post_statuses; unset( $eventbrite_post_statuses['publish'] ); $category_placeholder = esc_attr__( 'No Additional Categories', 'the-events-calendar' ); $category_dropdown = wp_dropdown_categories( [ 'echo' => false, 'name' => 'aggregator[category]', 'id' => 'tribe-ea-field-category', 'hide_empty' => false, 'class' => 'tribe-ea-field tribe-ea-dropdown tribe-ea-size-large', 'orderby' => 'post_title', 'taxonomy' => Tribe__Events__Main::TAXONOMY, ] ); $category_dropdown = preg_replace( '!\]*\>)!', '$1', $category_dropdown ); $category_dropdown = preg_replace( '!(value="' . $default_category . '")!', '$1 selected', $category_dropdown ); wp_nonce_field( 'tribe-aggregator-save-import', 'tribe_aggregator_nonce' ); ?> source = 'origins'; $field->label = esc_html__( 'Import Origin:', 'the-events-calendar' ); $field->placeholder = esc_attr__( 'Select Origin', 'the-events-calendar' ); $field->help = esc_attr__( 'Choose where you are importing from.', 'the-events-calendar' ); $field->options = tribe( 'events-aggregator.main' )->api( 'origins' )->get(); $field->upsell_options = []; foreach ( $field->options as $key => $option ) { $option->disabled = isset( $option->disabled ) ? $option->disabled : null; $option->upsell = isset( $option->upsell ) ? $option->upsell : false; $option->is_selected = false; if ( // Used on the EA Authorization tribe_get_request_var( 'ea-auth', false ) === $option->id // Used to Select a given origin when the page loads || tribe_get_request_var( 'ea-origin', false ) === $option->id ) { $option->is_selected = true; } // If this is an upsell option we move it to that optgroup if ( $option->disabled && $option->upsell && ! $has_license_key ) { $field->upsell_options[] = $option; unset( $field->options[ $key ] ); } } ?> $record, 'aggregator_action' => $aggregator_action, ]; if ( 'edit' === $aggregator_action ) { $this->template( 'origins/' . $record->meta['origin'], $form_args ); } else { $this->template( 'origins/limit', $form_args ); $this->template( 'origins/csv', $form_args ); $this->template( 'origins/ics', $form_args ); $this->template( 'origins/ical', $form_args ); $this->template( 'origins/gcal', $form_args ); $this->template( 'origins/meetup', $form_args ); $this->template( 'origins/eventbrite', $form_args ); $this->template( 'origins/url', $form_args ); } /** * Fires below the origin template output. * * HTML outputted here should be wrapped in a table row () that contains one
api( 'origins' )->get_name( $record->meta['origin'] ) ); ?>
and one . * * @since 4.6.24 * * @param string $aggregator_action Aggregator action (new or edit). * @param array $form_args Form arguments. */ do_action( 'tribe_events_aggregator_import_form', $aggregator_action, $form_args ); ?>
help = esc_html__( 'Choose a status for the event(s) to be imported with and/or define an Event Category to automatically assign. An assigned category will be added to the event in addition to any Event Categories from the import source.', 'the-events-calendar' ); $default_settings->help_scheduled = $default_settings->help . ' ' . esc_html__( 'These settings will also apply to events imported in the future via this scheduled import.', 'the-events-calendar' ); $csv_help = esc_html__( 'Select the Event Field that best matches your CSV file column. The contents of that column will then be mapped to the specified event field when the event is created.', 'the-events-calendar' ); $scheduled_save_help = esc_html__( 'When you save this scheduled import, the events above will begin importing.', 'the-events-calendar' ); ?>

get_url() ) . '#tribe-field-tribe_events_timezone_mode">', esc_html__( 'timezone settings', 'the-events-calendar' ), '', esc_html__( 'to change how the actual time is displayed on your calendar.', 'the-events-calendar' ) ); ?>

', '' ); ?>

get_url() ) . '#tribe-field-tribe_events_timezone_mode">', esc_html__( 'Settings > General', 'the-events-calendar' ), ' ).' ); ?>

maybe_display_eventbrite_upsell(); ?>
maybe_display_aggregator_upsell(); $csv_record = Tribe__Events__Aggregator__Records::instance()->get_by_origin( 'csv' ); $post_types = $csv_record->get_import_post_types(); foreach ( $post_types as $post_type ) : $type = str_replace( 'tribe_', '', $post_type->name ); ?>