Title: TargetScore Events Calendar
Author: avtarnanrey
Published: <strong>Julai 3, 2026</strong>
Last modified: Septemba 21, 2026

---

Tafuta vijalizi

![](https://ps.w.org/targetscore-calendar/assets/banner-772x250.png?rev=3595341)

![](https://ps.w.org/targetscore-calendar/assets/icon-256x256.png?rev=3595341)

# TargetScore Events Calendar

 By [avtarnanrey](https://profiles.wordpress.org/avtarnanrey/)

[Pakua](https://downloads.wordpress.org/plugin/targetscore-calendar.1.1.0.zip)

 * [Details](https://sw.wordpress.org/plugins/targetscore-calendar/#description)
 * [Reviews](https://sw.wordpress.org/plugins/targetscore-calendar/#reviews)
 *  [Installation](https://sw.wordpress.org/plugins/targetscore-calendar/#installation)
 * [Development](https://sw.wordpress.org/plugins/targetscore-calendar/#developers)

 [Saidia](https://wordpress.org/support/plugin/targetscore-calendar/)

## Maelezo

Given a single Club ID, this plugin displays that club’s upcoming events (fetched
from the TargetScore API) in two switchable views:

 * **Calendar** — a month grid with one color per event category and multi-day events
   shown as continuous bars.
 * **List** — the same upcoming events, chronological.

Clicking an event opens an event detail page rendered inside your site. A Register
button opens the external TargetScore registration page in a new tab. A separate
sidebar/footer **widget** shows a compact list of upcoming events.

All API calls are made server-side (proxied + cached via WordPress transients), 
so nothing hits the browser cross-origin and payloads stay small.

#### How it works

 * Configure a **Club ID** under **Settings  TargetScore Events Calendar**.
 * On activation the plugin creates a published **Events** page (slug `events`) 
   containing the `[targetscore_calendar]` shortcode. You can rename, move, or delete
   it freely.
 * Add the calendar to any page/post with the shortcode:
 * [targetscore_calendar]
 * Optional per-instance default view: `[targetscore_calendar view="list"]`.
 * The event detail page uses the same page with a `?event={slug}` query parameter—
   no rewrite rules needed.
 * Add the **“TargetScore: Upcoming Events”** widget to any sidebar/footer for a
   compact list.

### External services

This plugin connects to the TargetScore API to retrieve the configured club’s public
event data, and links to the TargetScore website for event registration.

**TargetScore API (api-next.targetscore.com)**
 The plugin makes server-side GET
requests to `https://api-next.targetscore.com` to fetch:

 * club information and event categories/colors — `/clubs/{clubId}`
 * the club’s upcoming events — `/events?clubIds={clubId}&timeframe=upcoming`
 * a single event’s details — `/events/slug/{eventSlug}`

These requests are triggered when a visitor loads a page containing the events calendar,
list, or the Upcoming Events widget. The only data sent is the Club ID you configure(
and, for the detail view, an event reference from the page URL). No personal visitor
data is transmitted. Responses are cached in WordPress transients.

The API address is configurable under **Settings  TargetScore Events Calendar**,
because this service is moving to `https://api.targetscore.com` once the previous
TargetScore backend is retired.

**TargetScore website (targetscore.com)**
 Event “Register” buttons and links open`
https://targetscore.com/{eventSlug}` in the visitor’s browser (a normal outbound
link; no data is sent by the plugin itself).

Service provider: TargetScore.
 Terms of Service: https://docs.targetscore.com/docs/
legal/terms-of-service Privacy Policy: https://docs.targetscore.com/docs/legal/privacy-
policy

### Developer notes

The front-end bundle (`assets/js/dist/targetscore-calendar.iife.js` + `.css`) is
compiled from `assets/js/src/` via esbuild:

    ```
    cd build
    npm install
    npm run build     # produce the bundle
    npm test          # run the normalizeEvent unit tests
    ```

All event-date parsing lives in one adapter (`assets/js/src/normalize.js`), mirrored
in PHP by `targevca_normalize_event()` in `includes/helpers.php` for the server-
rendered widget. Keep the two in lockstep.

The API address can also be pinned in `wp-config.php` with `define( 'TARGEVCA_API_BASE','
https://…' );` (which takes precedence over the setting and is shown read-only in
the admin), or filtered with `targevca_api_base`.

## Screenshots

[⌊Calendar (month grid) view with per-category colors and multi-day events.⌉⌊Calendar(
month grid) view with per-category colors and multi-day events.⌉[

Calendar (month grid) view with per-category colors and multi-day events.

[⌊List view of upcoming events.⌉⌊List view of upcoming events.⌉[

List view of upcoming events.

[⌊In-site event detail page with a Register button.⌉⌊In-site event detail page with
a Register button.⌉[

In-site event detail page with a Register button.

[⌊Upcoming Events sidebar/footer widget.⌉⌊Upcoming Events sidebar/footer widget.⌉[

Upcoming Events sidebar/footer widget.

[⌊Admin settings screen (Club ID, accent color, cache).⌉⌊Admin settings screen (
Club ID, accent color, cache).⌉[

Admin settings screen (Club ID, accent color, cache).

## Installation

 1. Upload the plugin folder to `/wp-content/plugins/` and activate it.
 2. Go to **Settings  TargetScore Events Calendar** and enter your **Club ID**.
 3. Visit the auto-created **Events** page (or add `[targetscore_calendar]` to any 
    page).

## FAQ

### Where does the data come from?

The public TargetScore API (default base `https://api-next.targetscore.com`), proxied
through this plugin’s own REST routes under `/wp-json/targetscore/v1/`.

### Do I need to change the API address?

No. The **API address** field under Settings is already set correctly. TargetScore
will tell you if it ever needs changing.

### How do I clear cached events?

**Settings  TargetScore Events Calendar  Clear cache now.** The cache is also cleared
automatically when you change the Club ID.

## Reviews

Hakuna hakiki za programu-jalizi hii.

## Wachangiaji & Wasanidi

“TargetScore Events Calendar” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ avtarnanrey ](https://profiles.wordpress.org/avtarnanrey/)

[Translate “TargetScore Events Calendar” into your language.](https://translate.wordpress.org/projects/wp-plugins/targetscore-calendar)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/targetscore-calendar/),
check out the [SVN repository](https://plugins.svn.wordpress.org/targetscore-calendar/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/targetscore-calendar/)
by [RSS](https://plugins.trac.wordpress.org/log/targetscore-calendar/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.0

 * Changed: the plugin now reads from the current TargetScore API at `https://api-
   next.targetscore.com`. Sites still pointing at the previous address are updated
   automatically on upgrade, and cached event data is cleared.
 * Added: an **API address** field on the settings screen, so the address can be
   changed when the older TargetScore backend is retired without waiting for a plugin
   update.
 * Improved: event links now use the event’s slug, so detail and registration URLs
   are readable. Existing links using the older event ids continue to work.
 * Improved: clubs with more than 100 upcoming events now load all of them instead
   of the first page.
 * Fixed: the event overview is now sanitized before being cached rather than on
   every page view.
 * Compatibility: tested against WordPress 7.1 and PHP 8.4.

#### 1.0.1

 * Fixed: the calendar could permanently show “Couldn’t load events right now” on
   sites with page caching. The front end no longer sends a REST nonce (the plugin’s
   routes are public and read-only), so a stale cached nonce can no longer make 
   WordPress reject every events request.
 * Added: upstream API failures are now recorded (last 20, with time, reason, HTTP
   status, and response snippet) and shown under Settings  TargetScore Events Calendar
   Recent errors, with a clear-log button.
 * Added: failures are also written to the PHP error log (throttled) even when WP_DEBUG
   is off, and a TargetScore section was added to Site Health  Info.
 * Improved: the browser console now reports the failure category (timeout, http_404,
   bad_json, …) to speed up support diagnostics.

#### 1.0.0

 * Initial release.
 * Calendar (month grid) and list views with per-category colors and multi-day bars.
 * In-site event detail page with sanitized rich-text overview and a popup-safe 
   Register button.
 * “Upcoming Events” sidebar/footer widget (server-rendered list).
 * Admin settings: Club ID, accent color (Register button, view toggle, today highlight),
   cache TTLs, clear cache, and a connection test.
 * PHP proxy with transient caching for all TargetScore API calls.

## Meta

 *  Version **1.1.0**
 *  Last updated **1 wiki zilizopita**
 *  Active installations **Chini ya 10**
 *  WordPress version ** 6.0 au juu **
 *  Tested up to **7.1.2**
 *  PHP version ** 7.4 au juu **
 *  Language
 * [English (US)](https://wordpress.org/plugins/targetscore-calendar/)
 * Tags
 * [calendar](https://sw.wordpress.org/plugins/tags/calendar/)[events](https://sw.wordpress.org/plugins/tags/events/)
 *  [Advanced View](https://sw.wordpress.org/plugins/targetscore-calendar/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/targetscore-calendar/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/targetscore-calendar/reviews/)

## Contributors

 *   [ avtarnanrey ](https://profiles.wordpress.org/avtarnanrey/)

## Saidia

Got something to say? Need help?

 [Angalia Baraza ya Usaidizi](https://wordpress.org/support/plugin/targetscore-calendar/)

## Changia

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://donate.stripe.com/aEU5lHenb6K81jy147)