[ 'type' => 'html', 'html' => '
', ], 'upsell-heading' => [ 'type' => 'heading', 'label' => $tec_events_general_heading_text, ], 'tec-setup-guide' => [ 'type' => 'html', 'html' => '

' . esc_html__( 'Looking for additional functionality including recurring events, custom meta, community events, ticket sales and more?', 'the-events-calendar' ), ], 'tec-add-ons-link' => [ 'type' => 'html', 'html' => sprintf( '
%2$s

', esc_url( 'edit.php?post_type=tribe_events&page=tribe-app-shop' ), esc_html_x( 'Check out the available add-ons.', 'Text for link to the add-ons page.', 'the-events-calendar' ) ), ], 'tec-links-section-start' => [ 'type' => 'html', 'html' => '', ], 'ical-info' => [ 'type' => 'html', 'display_callback' => '', 'conditional' => function_exists( 'tribe_get_ical_link' ), // @TODO: this never loads. ], 'info-end' => [ 'type' => 'html', 'html' => '
', ], ]; // Add the TOC $tec_events_general_toc = [ 'tec-settings-general-toc-nav-start' => [ 'type' => 'html', 'html' => '
', ], 'tec-settings-general-toc-start' => [ 'type' => 'html', 'html' => '', ], 'tec-settings-general-toc-nav-end' => [ 'type' => 'html', 'html' => '
', ], ]; /** * Allow filtering the Table of Contents bar on the General settings page. * * @since 6.5.2 * * @param array $tec_events_display_toc Array of items of the TOC. */ $general_tab_fields += apply_filters( 'tec_events_general_settings_toc', $tec_events_general_toc ); // Start the form content wrapper. $tec_events_general_form_start = [ 'tribe-form-content-start' => [ 'type' => 'html', 'html' => '
', ], ]; $general_tab_fields += $tec_events_general_form_start; // Add the "Viewing" section. $tec_events_general_viewing = [ 'tec-events-settings-general-viewing-title' => [ 'type' => 'html', 'html' => '

' . esc_html_x( 'Viewing', 'Title for the viewing section of the general settings.', 'the-events-calendar' ) . '

', ], 'unpretty-permalinks-url' => [ 'type' => 'wrapped_html', 'label' => esc_html__( 'Events URL slug', 'the-events-calendar' ), 'html' => '

' . sprintf( /* Translators: %1$s - link to the front-end calendar page, %2$s - URL to the permalinks admin page. */ __( 'The current URL for your events page is %1$s.

You cannot edit the slug for your events page as you do not have pretty permalinks enabled. In order to edit the slug here, enable pretty permalinks.', 'the-events-calendar' ), sprintf( '%2$s', esc_url( $tec->getLink( 'home' ) ), esc_url( $tec->getLink( 'home' ) ) ), esc_url( trailingslashit( get_admin_url() ) . 'options-permalink.php' ) ) . '

', 'conditional' => ( '' == get_option( 'permalink_structure' ) ), ], 'eventsSlug' => [ 'type' => 'text', 'label' => esc_html__( 'Events URL slug', 'the-events-calendar' ), 'default' => 'events', 'validation_type' => 'slug', 'conditional' => ( '' !== get_option( 'permalink_structure' ) ), ], 'current-events-slug' => [ 'type' => 'html', 'html' => '

' . esc_html__( 'The slug used for building the events URL.', 'the-events-calendar' ) . ' ' . sprintf( /* Translators: %1$s - URL to the events page (link), %2$s - URL to the events page (readable string) */ esc_html__( 'Your current events URL is: %2$s', 'the-events-calendar' ), esc_url( tribe_get_events_link() ), urldecode( tribe_get_events_link() ) ) . '

', 'conditional' => ( '' !== get_option( 'permalink_structure' ) ), ], 'singleEventSlug' => [ 'type' => 'text', 'label' => esc_html__( 'Single event URL slug', 'the-events-calendar' ), 'default' => 'event', 'validation_type' => 'slug', 'conditional' => ( '' != get_option( 'permalink_structure' ) ), ], 'current-single-event-slug' => [ 'type' => 'html', 'html' => '

' . sprintf( /* Translators: %1$s - URL to the single event page (readable string) */ __( 'The above should ideally be plural, and this singular.
Your single event URL is: %1$s', 'the-events-calendar' ), trailingslashit( home_url() ) . urldecode( tribe_get_option( 'singleEventSlug', 'event' ) ) . '/single-post-name/' ) . '

', 'conditional' => ( '' != get_option( 'permalink_structure' ) ), ], 'showEventsInMainLoop' => [ 'type' => 'checkbox_bool', 'label' => esc_html__( 'Include events in main blog loop', 'the-events-calendar' ), 'tooltip' => esc_html__( 'Show events with the site\'s other posts. When this box is checked, events will also continue to appear on the default events page.', 'the-events-calendar' ), 'default' => false, 'validation_type' => 'boolean', ], 'enable_month_view_cache' => [ 'type' => 'checkbox_bool', 'label' => __( 'Enable the Month View Cache', 'the-events-calendar' ), 'tooltip' => sprintf( /* Translators: %s - link to the Month View Cache documentation */ __( 'Check this to cache your month view HTML in transients, which can help improve calendar speed on sites with many events. Read more.', 'the-events-calendar' ), 'https://evnt.is/18di' ), 'default' => true, 'validation_type' => 'boolean', ], ]; $general_tab_fields += apply_filters( 'tribe_general_settings_viewing_section', $tec_events_general_viewing ); $is_missing_aggregator_license_key = '' === get_option( 'pue_install_key_event_aggregator' ); $should_hide_upsell = tec_should_hide_upsell(); // Add the "Editing" section. $tec_events_general_editing = [ 'tec-events-settings-general-editing-title' => [ 'type' => 'html', 'html' => '

' . esc_html_x( 'Editing', 'Title for the editing section of the general settings.', 'the-events-calendar' ) . '

', ], 'tec-aggregator-infobox-start' => [ 'type' => 'html', 'html' => '
', 'conditional' => $is_missing_aggregator_license_key && ! $should_hide_upsell, ], 'tec-aggregator-infobox-logo' => [ 'type' => 'html', 'html' => '', 'conditional' => $is_missing_aggregator_license_key && ! $should_hide_upsell, ], 'tec-aggregator-infobox-title' => [ 'type' => 'html', 'html' => '

' . __( 'Import events with Event Aggregator', 'the-events-calendar' ) . '

', 'conditional' => $is_missing_aggregator_license_key && ! $should_hide_upsell, ], 'tec-aggregator-infobox-content' => [ 'type' => 'html', 'html' => '

' . __( 'Effortlessly fill your calendar with events from Meetup, Eventbrite, iCal, Google Calendar, and more.', 'the-events-calendar' ) . '

', 'conditional' => $is_missing_aggregator_license_key && ! $should_hide_upsell, ], 'tec-aggregator-infobox-link' => [ 'type' => 'html', 'html' => '' . __( 'Learn more.', 'the-events-calendar' ) . '', 'conditional' => $is_missing_aggregator_license_key && ! $should_hide_upsell, ], 'tec-aggregator-infobox-end' => [ 'type' => 'html', 'html' => '
', 'conditional' => $is_missing_aggregator_license_key && ! $should_hide_upsell, ], 'disable_metabox_custom_fields' => [ 'type' => 'checkbox_bool', 'label' => esc_html__( 'Show Custom Fields metabox', 'the-events-calendar' ), 'tooltip' => esc_html__( 'Enable WordPress Custom Fields on events in the classic editor.', 'the-events-calendar' ), 'default' => true, 'validation_type' => 'boolean', ], ]; $general_tab_fields += apply_filters( 'tribe_general_settings_editing_section', $tec_events_general_editing ); // Our default tooltip. $trash_tooltip = esc_html__( 'This option allows you to automatically move past events to trash.', 'the-events-calendar' ); // Some adjusted functionality with CT1 activated. if ( tribe()->getVar( 'ct1_fully_activated' ) ) { $trash_tooltip = sprintf( /* Translators: %1$d - number of days, %2$s - `EMPTY_TRASH_DAYS` constant (code), %3$s - link to the documentation */ __( 'Trashed events will permanently be deleted in %1$d days, you can change that value using %2$s. Read more.', 'the-events-calendar' ), (int) EMPTY_TRASH_DAYS, 'EMPTY_TRASH_DAYS', 'https://evnt.is/1bcs' ); } // Add the "Maintenance" section. $tec_events_general_maintenance = [ 'tec-events-settings-general-maintenance-title' => [ 'type' => 'html', 'html' => '

' . esc_html_x( 'Maintenance', 'Title for the maintenance section of the general settings.', 'the-events-calendar' ) . '

', ], $event_cleaner->key_trash_events => [ 'type' => 'dropdown', 'label' => esc_html__( 'Move to trash events older than', 'the-events-calendar' ), 'tooltip' => $trash_tooltip, 'validation_type' => 'options', 'size' => 'small', 'default' => null, 'options' => [ null => esc_html__( 'Disabled', 'the-events-calendar' ), 1 => esc_html__( '1 month', 'the-events-calendar' ), 3 => esc_html__( '3 months', 'the-events-calendar' ), 6 => esc_html__( '6 months', 'the-events-calendar' ), 9 => esc_html__( '9 months', 'the-events-calendar' ), 12 => esc_html__( '1 year', 'the-events-calendar' ), 24 => esc_html__( '2 years', 'the-events-calendar' ), 36 => esc_html__( '3 years', 'the-events-calendar' ), ], ], $event_cleaner->key_delete_events => [ 'type' => 'dropdown', 'label' => esc_html__( 'Permanently delete events older than', 'the-events-calendar' ), 'tooltip' => esc_html__( 'This option allows you to bulk delete past events. Be careful and backup your database before removing your events as there is no way to reverse the changes.', 'the-events-calendar' ), 'validation_type' => 'options', 'size' => 'small', 'default' => null, 'options' => [ null => esc_html__( 'Disabled', 'the-events-calendar' ), 1 => esc_html__( '1 month', 'the-events-calendar' ), 3 => esc_html__( '3 months', 'the-events-calendar' ), 6 => esc_html__( '6 months', 'the-events-calendar' ), 9 => esc_html__( '9 months', 'the-events-calendar' ), 12 => esc_html__( '1 year', 'the-events-calendar' ), 24 => esc_html__( '2 years', 'the-events-calendar' ), 36 => esc_html__( '3 years', 'the-events-calendar' ), ], ], 'amalgamate-duplicates' => [ 'type' => 'html', 'html' => '
' . esc_html__( 'Merge duplicate Venues & Organizers', 'the-events-calendar' ) . '
' . Tribe__Events__Amalgamator::migration_button( esc_html__( 'Merge Duplicates', 'the-events-calendar' ) ) . '

' . esc_html__( 'Click this button to automatically merge identical venues and organizers.', 'the-events-calendar' ) . '

', ], ]; $general_tab_fields += apply_filters( 'tribe_general_settings_maintenance_section', $tec_events_general_maintenance ); // Add the "Debugging" section. $tec_events_general_debugging = [ 'tec-events-settings-general-debugging-title' => [ 'type' => 'html', 'html' => '

' . esc_html_x( 'Debugging', 'Title for the debugging section of the general settings.', 'the-events-calendar' ) . '

', ], 'tec-troubleshooting-infobox-start' => [ 'type' => 'html', 'html' => '
', ], 'tec-troubleshooting-infobox-logo' => [ 'type' => 'html', 'html' => '', ], 'tec-troubleshooting-infobox-title' => [ 'type' => 'html', 'html' => '

' . __( 'There is a solution for every problem', 'the-events-calendar' ) . '

', ], 'tec-troubleshooting-infobox-content' => [ 'type' => 'html', 'html' => sprintf( /* Translators: %1$s - opening paragraph tag, %2$s - opening anchor tag, %3$s - closing anchor tag, %4$s - closing paragraph tag */ __( '%1$sSometimes things just don’t work as expected. The %2$stroubleshooting page%3$s has a wealth of resources to get you back on track.%4$s', 'the-events-calendar' ), '

', '', '', '

', ), ], 'tec-troubleshooting-infobox-end' => [ 'type' => 'html', 'html' => '
', ], 'debugEvents' => [ 'type' => 'checkbox_bool', 'label' => esc_html__( 'Debug mode', 'the-event-calendar' ), 'tooltip' => sprintf( /* Translators: %1$s - wordpress.org link to the Debug Bar Plugin */ esc_html__( 'Enable this option to log debug information. By default this will log to your server PHP error log. If you\'d like to see the log messages in your browser, then we recommend that you install the %1$s and look for the "Tribe" tab in the debug output.', 'the-event-calendar' ), '' . esc_html__( 'Debug Bar Plugin', 'the-event-calendar' ) . '' ), 'default' => false, 'validation_type' => 'boolean', 'conditional' => is_super_admin(), ], ]; $general_tab_fields += apply_filters( 'tribe_general_settings_debugging_section', $tec_events_general_debugging ); // Close the form content wrapper. $general_tab_fields += [ 'tribe-form-content-end' => [ 'type' => 'html', 'html' => '
', ], ]; $general_tab = [ 'priority' => 0, 'fields' => apply_filters( 'tribe_general_settings_tab_fields', $general_tab_fields ), ];