a lot of small fixes to make a minimal commit

This commit is contained in:
André Menrath 2024-08-27 21:42:17 +02:00
parent 02fd6af960
commit efcdf00ae3
4 changed files with 12 additions and 8 deletions

View file

@ -88,7 +88,7 @@ class Settings_Page {
$event_terms = array(); $event_terms = array();
foreach ( $event_plugins as $event_plugin_name => $events_plugin_info ) { foreach ( $event_plugins as $event_plugin_name => $events_plugin_info ) {
$event_terms[ $event_plugin_name ] = self::get_event_terms( $events_plugin_info ); $event_terms = array_merge( $event_terms, self::get_event_terms( $events_plugin_info ) );
} }
$args = array( $args = array(

View file

@ -9,7 +9,7 @@
* @since 1.0.0 * @since 1.0.0
*/ */
namespace Activitypub_Event_Extensions\Admin; namespace Activitypub_Event_Extensions;
use Activitypub\Activity\Extended_Object\Event; use Activitypub\Activity\Extended_Object\Event;

View file

@ -52,6 +52,7 @@ class Setup {
'post_type' => 'event', 'post_type' => 'event',
'settings_page_id' => 'settings_page_vsel', 'settings_page_id' => 'settings_page_vsel',
'transformer_class' => 'VS_Event', 'transformer_class' => 'VS_Event',
'taxonomy' => 'event_cat',
), ),
); );
@ -122,6 +123,14 @@ class Setup {
return $active_event_plugins; return $active_event_plugins;
} }
/**
* Getter function for the active event plugins.
*/
public function get_active_event_plugins() {
return $this->active_event_plugins;
}
/** /**
* Set up hooks for various purposes. * Set up hooks for various purposes.
* *

View file

@ -23,12 +23,7 @@ if ( ! current_user_can( 'manage_options' ) ) {
return; return;
} }
$event_terms = get_terms( $event_terms = $args['event_terms'];
array(
'taxonomy' => 'tribe_events_cat',
'hide_empty' => true,
)
);
$default_event_category_strings = array( $default_event_category_strings = array(
'ARTS' => __( 'Arts', 'activitypub-event-extensions' ), 'ARTS' => __( 'Arts', 'activitypub-event-extensions' ),