'marker',
'warning' => 'warning',
'bad' => 'dismiss',
];
$show_third_party_accounts = ! is_network_admin();
?>
';
return ob_get_clean();
}
$service = tribe( 'events-aggregator.service' );
$import_limit = $service->get_limit( 'import' );
$import_available = $service->get_limit_remaining();
$import_count = $service->get_limit_usage();
$indicator = 'good';
$notes = ' ';
if ( 0 === $import_limit || $import_count >= $import_limit ) {
$indicator = 'bad';
$notes = esc_html__( 'You have reached your daily import limit. Scheduled imports will be paused until tomorrow.', 'the-events-calendar' );
} elseif ( $import_count / $import_limit >= 0.8 ) {
$indicator = 'warning';
$notes = esc_html__( 'You are approaching your daily import limit. You may want to adjust your Scheduled Import frequencies.', 'the-events-calendar' );
}
$text = sprintf( // import count and limit
_n( '%1$d import used out of %2$d available today', '%1$d imports used out of %2$d available today', $import_count, 'the-events-calendar' ),
intval( $import_count ),
intval( $import_limit )
);
?>
|
|
|
|
|
api()->domain;
$up = tribe( 'events-aggregator.service' )->get( 'status/up' );
if ( ! $up || is_wp_error( $up ) ) {
$indicator = 'bad';
/* translators: %s: Event Aggregator Server URL */
$text = sprintf( __( 'Not connected to %s', 'the-events-calendar' ), $ea_server );
$notes = esc_html__( 'The server is not currently responding', 'the-events-calendar' );
} elseif ( is_object( $up ) && is_object( $up->data ) && isset( $up->data->status ) && 400 <= $up->data->status ) {
// this is a rare condition that should never happen
// An example case: the route is not defined on the EA server
$indicator = 'warning';
/* translators: %s: Event Aggregator Server URL */
$text = sprintf( __( 'Not connected to %s', 'the-events-calendar' ), $ea_server );
$notes = __( 'The server is responding with an error:', 'the-events-calendar' );
$notes .= '';
$notes .= esc_html( $up->message );
$notes .= '
';
} else {
/* translators: %s: Event Aggregator Server URL */
$text = sprintf( __( 'Connected to %s', 'the-events-calendar' ), $ea_server );
}
// @todo [BTRIA-611]: Link $text to the status page.
?>
|
|
|
|
|
|
|
|
|
api( 'origins' )->is_oauth_enabled( 'eventbrite' ) ) {
if ( ! tribe( 'events-aggregator.settings' )->has_eb_security_key() ) {
$indicator = 'warning';
$text = __( 'You have not connected Event Aggregator to Eventbrite', 'the-events-calendar' );
$eventbrite_auth_url = Tribe__Events__Aggregator__Record__Eventbrite::get_auth_url(
[ 'back' => 'settings' ]
);
$notes = '' . esc_html_x( 'Connect to Eventbrite', 'link for connecting eventbrite', 'the-events-calendar' ) . '';
}
} else {
$indicator = 'warning';
$text = __( 'Limited connectivity with Eventbrite', 'the-events-calendar' );
$notes = esc_html__( 'The service has disabled oAuth. Some types of events may not import.', 'the-events-calendar' );
}
?>
|
|
|
|
api( 'origins' )->is_oauth_enabled( 'meetup' ) ) {
if ( ! tribe( 'events-aggregator.settings' )->has_meetup_security_key() ) {
$indicator = 'warning';
$text = __( 'You have not connected Event Aggregator to Meetup', 'the-events-calendar' );
$meetup_auth_url = Tribe__Events__Aggregator__Record__Meetup::get_auth_url( [ 'back' => 'settings' ] );
$notes = '' . esc_html_x( 'Connect to Meetup', 'link for connecting meetup', 'the-events-calendar' ) . '';
}
} else {
$indicator = 'warning';
$text = __( 'Limited connectivity with Meetup', 'the-events-calendar' );
$notes = esc_html__( 'The service has disabled oAuth. Some types of events may not import.', 'the-events-calendar' );
}
?>
|
|
|
|
) that contains 2 cells (s).
*
* @since 4.6.24
*
* @param array $indicator_icons List of indicator icons.
*/
do_action( 'tribe_events_status_third_party', $indicator_icons );
?>
|