by Zuugle Services on WordPress.org
Diana GreenConnect is a trip-planning block that lets users schedule trips to and from activities with constraints like start/end time and duration.

This screen shot represents a preview header of what the initial Widget Page would look like.
Diana GreenConnect is a WordPress plugin that provides a Gutenberg block to seamlessly integrate the powerful DianaWidget Activity Transit Planner into your WordPress pages and posts. It allows users to plan public transport to and from activities with specific time constraints like start times, end times, and duration.
This plugin acts as a wrapper for the DianaWidget, a sophisticated JavaScript library designed for activity-based transit planning. By using the “Diana GreenConnect Widget” block, you can easily embed this functionality into your content, allowing your site visitors to:
The plugin handles secure API authentication with Zuugle Services by allowing administrators to store Client ID and Client Secret in WordPress settings. These credentials are then used server-side to fetch an API token, which is passed to the widget. Each block instance can be configured with unique activity details directly within the WordPress editor.
The core functionality is provided by the DianaWidget, a standalone JavaScript library. For more detailed information about the widget’s features, its own configuration options (which this plugin exposes), styling, and architecture, please refer to its GitHub repository:
https://github.com/zuugle-services/DianaWidget
To use the Diana GreenConnect widget, you first need a Client ID and Client Secret. These are used to securely connect to the Zuugle Services API.
Client ID and Client Secret.The Client ID is a public identifier, but the Client Secret is confidential and must be kept secure. This plugin stores it safely in your WordPress database and never exposes it to the public.
Once you have your credentials:
Settings > Diana GreenConnect in your WordPress admin area.Client ID and Client Secret into the respective fields.+ icon to add a new block.You can embed the widget using the [diana_greenconnect_widget] shortcode. This is ideal for the Classic Editor, page builders (like Elementor or Divi), or widget areas.
All attributes from the Gutenberg block are available. Convert the attribute name to all lowercase. For example, activityName becomes activityname.
Example:
[diana_greenconnect_widget activityname=”Museum Visit” activitydurationminutes=”120″ activitystartlocation=”Museum Address” activitystartlocationtype=”address”]
Important: For the user start location caching to work with a shortcode, you must provide a unique and stable widgetid.
Example with a stable ID:
[diana_greenconnect_widget widgetid=”main-museum-widget” activityname=”Museum Visit” …]
Example of how to use this function:
You can also render the Diana GreenConnect Widget block programmatically within your PHP code using the helper function diana_greenconnect_get_block_html().
Example:
'main-sidebar-hiking-widget',
// Required
'activityName' => 'Marktschellenberger Eishöhle im Untersberg',
'activityType' => 'Hiking',
'activityStartLocation' => '47.72620173410345, 13.042174020936743',
'activityStartLocationType' => 'coordinates',
'activityEndLocation' => '47.70487271915757, 13.038710343883247',
'activityEndLocationType' => 'coordinates',
'activityEarliestStartTime' => '08:00:00',
'activityLatestStartTime' => '14:00:00',
'activityEarliestEndTime' => '10:00:00',
'activityLatestEndTime' => '20:00:00',
'activityDurationMinutes' => '300',
// Optional
'activityStartLocationDisplayName' => 'Untersbergbahn Talstation',
'activityEndLocationDisplayName' => 'Eishöhle, Marktschellenberg',
'timezone' => 'Europe/Vienna', // Set timezone in which all config times are given
'activityStartTimeLabel' => 'Beginn',
'activityEndTimeLabel' => 'Ende',
'apiBaseUrl' => 'https://api.zuugle-services.net',
'language' => 'EN', // Currently supported: EN, DE, FR, IT, TH, ES
'overrideUserStartLocation' => 'Wien, Stephansplatz',
'overrideUserStartLocationType' => 'address',
'displayStartDate' => null,
'displayEndDate' => null,
'destinationInputName' => 'Destination Input Placeholder',
'containerMaxHeight' => '650px',
'hideOverriddenActivityStartDate' => true,
// Multiday parameters
'multiday' => false,
'overrideActivityStartDate' => "2025-05-20", // Can also be used for single-day date
'overrideActivityEndDate' => "2025-05-25",
'activityDurationDaysFixed' => 2,
// Caching & Sharing parameters
'cacheUserStartLocation' => true,
'userStartLocationCacheTTLMinutes' => 15,
'share' => true,
'allowShareView' => true,
'shareURLPrefix' => '',
// ClientID and ClientSecret are typically managed by the plugin's settings page.
// Only include them here if you need to override for a specific instance.
// 'clientID' => 'your_client_id_override',
// 'clientSecret' => 'your_client_secret_override',
];
$widget_info = diana_greenconnect_get_block_html( $my_widget_attributes );
// Output the HTML (e.g., in a template file or via a shortcode)
echo $widget_info['html'];
?>
When using this function, providing a stable widgetId is crucial for the caching feature to work correctly.
This plugin connects to external services provided by Zuugle Services GmbH to provide its transit planning functionality.
DianaWidget, a JavaScript library that is loaded from a Content Delivery Network (CDN) at https://diana.zuugle-services.net/dist/DianaWidget.bundle.js. This script is loaded on pages where the Diana GreenConnect block is used to display the transit planning widget.Zuugle Services API: To function, the widget needs to communicate with the Zuugle Services API, which has its main endpoint at https://api.zuugle-services.net. This plugin securely handles the authentication with this API.
Client ID and Client Secret (which are configured in the plugin’s settings) to the token endpoint at https://api.zuugle-services.net/o/token/. This happens on the server-side when a user visits a page containing the widget and a valid token is not already cached. No user data is sent in this step.