get_url( [ 'tab' => 'addons' ] ); // if there's an Event Aggregator license key, add the Meetup.com API fields if ( get_option( 'pue_install_key_event_aggregator' ) ) { $missing_meetup_credentials = ! tribe( 'events-aggregator.settings' )->is_ea_authorized_for_meetup(); ob_start(); ?>
' . esc_html__( 'You need to connect to Meetup for Event Aggregator to work properly' ) . '

'; $meetup_button_label = __( 'Connect to Meetup', 'the-events-calendar' ); } else { $meetup_button_label = __( 'Refresh your connection to Meetup', 'the-events-calendar' ); $meetup_disconnect_label = __( 'Disconnect', 'the-events-calendar' ); $meetup_disconnect_url = tribe( 'events-aggregator.settings' )->build_disconnect_meetup_url( $current_url ); } ?>
[ 'type' => 'html', 'html' => '

' . esc_html__( 'Meetup', 'the-events-calendar' ) . '

', ], 'meetup-info-box' => [ 'type' => 'html', 'html' => '

' . esc_html__( 'You need to connect Event Aggregator to Meetup to import your events from Meetup.', 'the-events-calendar' ) . '

', ], 'meetup_token_button' => [ 'type' => 'html', 'html' => $meetup_token_html, ], ]; $internal = array_merge( $internal, $internal_meetup ); } /** * Show Eventbrite API Connection only if Eventbrite Plugin is Active or Event Aggregator license key has a license key */ if ( class_exists( 'Tribe__Events__Tickets__Eventbrite__Main' ) || get_option( 'pue_install_key_event_aggregator' ) ) { $missing_eb_credentials = ! tribe( 'events-aggregator.settings' )->is_ea_authorized_for_eb(); ob_start(); ?>
' . esc_html__( 'You need to connect to Eventbrite for Event Aggregator to work properly' ) . '

'; $eventbrite_button_label = __( 'Connect to Eventbrite', 'the-events-calendar' ); } else { $eventbrite_button_label = __( 'Refresh your connection to Eventbrite', 'the-events-calendar' ); $eventbrite_disconnect_label = __( 'Disconnect', 'the-events-calendar' ); $eventbrite_disconnect_url = tribe( 'events-aggregator.settings' )->build_disconnect_eventbrite_url( $current_url ); } ?>
[ 'type' => 'html', 'html' => '

' . esc_html__( 'Eventbrite', 'the-events-calendar' ) . '

', ], 'eb-info-box' => [ 'type' => 'html', 'html' => '

' . esc_html__( 'You need to connect Event Aggregator to Eventbrite to import your events from Eventbrite.', 'the-events-calendar' ) . '

', ], 'eb_token_button' => [ 'type' => 'html', 'html' => $eventbrite_token_html, ], ]; $internal = array_merge( $internal, $internal2 ); } $internal = apply_filters( 'tribe_addons_tab_fields', $internal ); $fields = array_merge( [ 'addons-box-start' => [ 'type' => 'html', 'html' => '
', ], 'addons-box-title' => [ 'type' => 'html', 'html' => '

' . esc_html__( 'APIs', 'the-events-calendar' ) . '

', ], 'addons-box-description' => [ 'type' => 'html', 'html' => '

' . __( 'Some features and add-ons require you to enter an API key or log into a third-party website so that The Events Calendar can communicate with an outside source.', 'the-events-calendar' ) . '

', ], 'addons-box-end' => [ 'type' => 'html', 'html' => '
', ], 'addons-form-content-start' => [ 'type' => 'html', 'html' => '
', ], ], $internal, [ 'addons-form-content-end' => [ 'type' => 'html', 'html' => '
', ], ] ); /** * Allow developer to fully filter the Addons Tab contents * Following the structure of the arguments for a Tribe__Settings_Tab instance * * @var array */ $addons = apply_filters( 'tribe_addons_tab', [ 'priority' => 50, 'fields' => $fields, ] ); // Only create the Add-ons Tab if there is any if ( ! empty( $internal ) ) { new Tribe__Settings_Tab( 'addons', esc_html__( 'APIs', 'the-events-calendar' ), $addons ); }