diff --git a/templates/settings.php b/templates/settings.php index 0652cbd..8eb382e 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -25,39 +25,7 @@ if ( ! current_user_can( 'manage_options' ) ) { $event_terms = $args['event_terms']; -$default_event_category_strings = array( - 'ARTS' => __( 'Arts', 'activitypub-event-bridge' ), - 'BOOK_CLUBS' => __( 'Book clubs', 'activitypub-event-bridge' ), - 'BUSINESS' => __( 'Business', 'activitypub-event-bridge' ), - 'CAUSES' => __( 'Causes', 'activitypub-event-bridge' ), - 'COMEDY' => __( 'Comedy', 'activitypub-event-bridge' ), - 'CRAFTS' => __( 'Crafts', 'activitypub-event-bridge' ), - 'FOOD_DRINK' => __( 'Food & Drink', 'activitypub-event-bridge' ), - 'HEALTH' => __( 'Health', 'activitypub-event-bridge' ), - 'MUSIC' => __( 'Music', 'activitypub-event-bridge' ), - 'AUTO_BOAT_AIR' => __( 'Auto, boat and air', 'activitypub-event-bridge' ), - 'COMMUNITY' => __( 'Community', 'activitypub-event-bridge' ), - 'FAMILY_EDUCATION' => __( 'Family & Education', 'activitypub-event-bridge' ), - 'FASHION_BEAUTY' => __( 'Fashion & Beauty', 'activitypub-event-bridge' ), - 'FILM_MEDIA' => __( 'Film & Media', 'activitypub-event-bridge' ), - 'GAMES' => __( 'Games', 'activitypub-event-bridge' ), - 'LANGUAGE_CULTURE' => __( 'Language & Culture', 'activitypub-event-bridge' ), - 'LEARNING' => __( 'Learning', 'activitypub-event-bridge' ), - 'LGBTQ' => __( 'LGBTQ', 'activitypub-event-bridge' ), - 'MOVEMENTS_POLITICS' => __( 'Movements and politics', 'activitypub-event-bridge' ), - 'NETWORKING' => __( 'Networking', 'activitypub-event-bridge' ), - 'PARTY' => __( 'Party', 'activitypub-event-bridge' ), - 'PERFORMING_VISUAL_ARTS' => __( 'Performing & Visual Arts', 'activitypub-event-bridge' ), - 'PETS' => __( 'Pets', 'activitypub-event-bridge' ), - 'PHOTOGRAPHY' => __( 'Photography', 'activitypub-event-bridge' ), - 'OUTDOORS_ADVENTURE' => __( 'Outdoors & Adventure', 'activitypub-event-bridge' ), - 'SPIRITUALITY_RELIGION_BELIEFS' => __( 'Spirituality, Religion & Beliefs', 'activitypub-event-bridge' ), - 'SCIENCE_TECH' => __( 'Science & Tech', 'activitypub-event-bridge' ), - 'SPORTS' => __( 'Sports', 'activitypub-event-bridge' ), - 'THEATRE' => __( 'Theatre', 'activitypub-event-bridge' ), - 'MEETING' => __( 'Meeting', 'activitypub-event-bridge' ), // Default value in federation. - 'DEFAULT' => __( 'Default', 'activitypub-event-bridge' ), // Internal default for overrides. -); +require_once ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . '/includes/event-categories.php'; $selected_default_event_category = \get_option( 'activitypub_event_bridge_default_event_category', 'MEETING' ); $current_category_mapping = \get_option( 'activitypub_event_bridge_event_category_mappings', array() ); @@ -83,7 +51,7 @@ $current_category_mapping = \get_option( 'activitypub_event_bridge_event_