Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
0fba291706 | |||
8168df2965 | |||
8e56eb66c0 |
4 changed files with 9 additions and 50 deletions
|
@ -5,7 +5,6 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- improve_tests
|
- improve_tests
|
||||||
- ci_badge
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
@ -94,12 +93,3 @@ jobs:
|
||||||
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=events_manager
|
run: cd /workspace/Event-Federation/wordpress-activitypub-event-bridge/ && ./vendor/bin/phpunit --filter=events_manager
|
||||||
env:
|
env:
|
||||||
PHP_VERSION: ${{ matrix.php-version }}
|
PHP_VERSION: ${{ matrix.php-version }}
|
||||||
|
|
||||||
- name: Save WordPress version and plugin versions to file
|
|
||||||
run: curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x wp-cli.phar && mv wp-cli.phar /usr/local/bin/wp && wp core version --allow-root > wordpress_versions.txt && wp plugin list --allow-root --format=json >> wordpress_versions.txt
|
|
||||||
|
|
||||||
- name: Upload WordPress and Plugin Versions
|
|
||||||
uses: https://code.forgejo.org/actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: versions
|
|
||||||
path: wordpress_versions.txt
|
|
|
@ -60,7 +60,7 @@ If you’re new to the [ActivityPub plugin](https://wordpress.org/plugins/activi
|
||||||
|
|
||||||
### Do I need to install another event plugin to use the Event Federation plugin?
|
### Do I need to install another event plugin to use the Event Federation plugin?
|
||||||
|
|
||||||
Yes, this plugin works needs a supported event plugin such as The Events Calendar, VS Event List, or Events Manager to manage your events. It just fills the missing gap between event plugins and the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/).
|
Yes, this plugin works as an add-on and requires both the ActivityPub plugin and a supported event plugin such as The Events Calendar, VS Event List, or Events Manager to manage your events. It just fills the missing gap between event plugins and the [ActivityPub plugin](https://wordpress.org/plugins/activitypub/).
|
||||||
|
|
||||||
### What platforms can follow my events?
|
### What platforms can follow my events?
|
||||||
Your events can be followed on platforms that support ActivityPub like [Mobilizon](https://joinmobilizon.org/), [Gancio](https://gancio.org), [Friendica](https://friendi.ca), [Hubzilla](https://hubzilla.org), and [Pleroma](https://pleroma.social/). Even other applications like [Mastodon](https://joinmastodon.org), which don’t fully support events yet, will display all important information about the events.
|
Your events can be followed on platforms that support ActivityPub like [Mobilizon](https://joinmobilizon.org/), [Gancio](https://gancio.org), [Friendica](https://friendi.ca), [Hubzilla](https://hubzilla.org), and [Pleroma](https://pleroma.social/). Even other applications like [Mastodon](https://joinmastodon.org), which don’t fully support events yet, will display all important information about the events.
|
||||||
|
|
|
@ -50,9 +50,10 @@ If you’re new to the [ActivityPub plugin](https://wordpress.org/plugins/activi
|
||||||
|
|
||||||
= Do I need to install another event plugin to use the Event Federation Plugin? =
|
= Do I need to install another event plugin to use the Event Federation Plugin? =
|
||||||
|
|
||||||
Yes, this plugin works as an add-on and requires both the ActivityPub plugin a supported event plugin such as The Events Calendar, VS Event List, or Events Manager to manage your events.
|
Yes, this plugin works as an add-on and requires both the ActivityPub plugin and a supported event plugin such as The Events Calendar, VS Event List, or Events Manager to manage your events.
|
||||||
|
|
||||||
= What platforms can follow my events? =
|
= What platforms can follow my events? =
|
||||||
|
|
||||||
Your events can be followed on platforms that support ActivityPub like [Mobilizon](https://joinmobilizon.org/), [Gancio](https://gancio.org), [Friendica](https://friendi.ca), [Hubzilla](https://hubzilla.org), and [Pleroma](https://pleroma.social/). Even other applications like [Mastodon](https://joinmastodon.org), which don’t fully support events yet, will display all important information about the events.
|
Your events can be followed on platforms that support ActivityPub like [Mobilizon](https://joinmobilizon.org/), [Gancio](https://gancio.org), [Friendica](https://friendi.ca), [Hubzilla](https://hubzilla.org), and [Pleroma](https://pleroma.social/). Even other applications like [Mastodon](https://joinmastodon.org), which don’t fully support events yet, will display all important information about the events.
|
||||||
|
|
||||||
= How much extra work is required to maintain my events across the decentralized Web? =
|
= How much extra work is required to maintain my events across the decentralized Web? =
|
||||||
|
|
|
@ -25,39 +25,7 @@ if ( ! current_user_can( 'manage_options' ) ) {
|
||||||
|
|
||||||
$event_terms = $args['event_terms'];
|
$event_terms = $args['event_terms'];
|
||||||
|
|
||||||
$default_event_category_strings = array(
|
require_once ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_DIR . '/includes/event-categories.php';
|
||||||
'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.
|
|
||||||
);
|
|
||||||
|
|
||||||
$selected_default_event_category = \get_option( 'activitypub_event_bridge_default_event_category', 'MEETING' );
|
$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() );
|
$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_
|
||||||
<td>
|
<td>
|
||||||
<select id="activitypub_event_bridge_default_event_category" name="activitypub_event_bridge_default_event_category">';
|
<select id="activitypub_event_bridge_default_event_category" name="activitypub_event_bridge_default_event_category">';
|
||||||
<?php
|
<?php
|
||||||
foreach ( $default_event_category_strings as $value => $label ) {
|
foreach ( ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES as $value => $label ) {
|
||||||
echo '<option value="' . esc_attr( $value ) . '" ' . selected( $selected_default_event_category, $value, false ) . '>' . esc_html( $label ) . '</option>';
|
echo '<option value="' . esc_attr( $value ) . '" ' . selected( $selected_default_event_category, $value, false ) . '>' . esc_html( $label ) . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -114,13 +82,13 @@ $current_category_mapping = \get_option( 'activitypub_event_bridge_event_
|
||||||
$mapping = 'DEFAULT';
|
$mapping = 'DEFAULT';
|
||||||
}
|
}
|
||||||
if ( 'DEFAULT' === $mapping ) {
|
if ( 'DEFAULT' === $mapping ) {
|
||||||
echo '<option value="' . esc_attr( $mapping ) . '"> -- ' . esc_html( $default_event_category_strings[ $mapping ] ) . ' -- </option>';
|
echo '<option value="' . esc_attr( $mapping ) . '"> -- ' . esc_html( ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES[ $mapping ] ) . ' -- </option>';
|
||||||
} else {
|
} else {
|
||||||
echo '<option value="' . esc_attr( $mapping ) . '">' . esc_html( $default_event_category_strings[ $mapping ] ) . '</option>';
|
echo '<option value="' . esc_attr( $mapping ) . '">' . esc_html( ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES[ $mapping ] ) . '</option>';
|
||||||
}
|
}
|
||||||
echo '<option value="DEFAULT" ' . selected( $selected_default_event_category, 'DEFAULT', false ) . '> -- ' . esc_html__( 'Default', 'activitypub-event-bridge' ) . ' -- </option>';
|
echo '<option value="DEFAULT" ' . selected( $selected_default_event_category, 'DEFAULT', false ) . '> -- ' . esc_html__( 'Default', 'activitypub-event-bridge' ) . ' -- </option>';
|
||||||
foreach ( Event::DEFAULT_EVENT_CATEGORIES as $event_category ) {
|
foreach ( Event::DEFAULT_EVENT_CATEGORIES as $event_category ) {
|
||||||
echo '<option value="' . esc_attr( $event_category ) . '" ' . selected( $mappings[ $event_term->slug ] ?? '', $event_category, false ) . '>' . esc_html( $default_event_category_strings[ $event_category ] ) . '</option>';
|
echo '<option value="' . esc_attr( $event_category ) . '" ' . selected( $mappings[ $event_term->slug ] ?? '', $event_category, false ) . '>' . esc_html( ACTIVITYPUB_EVENT_BRIDGE_EVENT_CATEGORIES[ $event_category ] ) . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in a new issue