AstroAstro Daily Horoscope

Description

AstroAstro Daily Horoscope adds a WordPress widget that displays daily horoscope summaries for the twelve zodiac signs. A dynamic Gutenberg block is also included for sites that use the block editor.

The plugin uses the official AstroAstro API. If no API key is stored yet, the plugin registers the current site domain with AstroAstro and stores the returned key locally. It then uses that key to fetch daily horoscope summaries. If the API is temporarily unavailable, local demonstration texts are displayed so site owners can still test the widget layout.

Main features:

  • Configurable WordPress widget.
  • Dynamic Gutenberg block.
  • Column, row, and sidebar layouts.
  • Compact display by default, with a standard density option.
  • Display all zodiac signs or a single selected sign.
  • Included WebP icons for the twelve zodiac signs.
  • The sign name is always displayed as text.
  • Daily API response caching.
  • Daily cache purge at 00:01 using WP-Cron.
  • Attribution link to the full AstroAstro horoscope page below the widget.
  • Strict sanitization, validation, and escaping for API data and rendered output.

External services

This plugin connects to the AstroAstro API to register the current site and retrieve daily horoscope summaries. This service is required for the plugin to display current daily horoscope content from AstroAstro.

Service provider: AstroAstro, https://astroastro.fr/

Terms of use: https://astroastro.fr/conditions-generales-dutilisation/

Privacy policy: https://astroastro.fr/politique-de-confidentialite/

Data sent during site registration:

  • The site’s domain name in the site request parameter.
  • The site URL in the technical User-Agent header generated for the API request.

Data sent when fetching horoscopes:

  • The site’s domain name in the site request parameter.
  • The locally stored API key in the key request parameter.
  • The site URL in the technical User-Agent header generated for the API request.

API endpoints used by this plugin:

  • https://astroastro.fr/wp-json/astroastro/v1/horoscope-plugin/register
  • https://astroastro.fr/wp-json/astroastro/v1/horoscope-plugin

The plugin does not send visitor names, email addresses, IP addresses, birth dates, or individual visitor horoscope selections to AstroAstro.

API

If no API key is stored yet, the plugin calls:

POST https://astroastro.fr/wp-json/astroastro/v1/horoscope-plugin/register?site=example.com

If the POST request is not accepted, the plugin tries the same endpoint with GET.

Then, the plugin fetches horoscopes with:

GET https://astroastro.fr/wp-json/astroastro/v1/horoscope-plugin?key=xxx&site=example.com

Expected JSON format:

{
  "date": "2026-06-16",
  "servedDate": "2026-06-16",
  "fallback": false,
  "source": "AstroAstro",
  "source_url": "https://astroastro.fr/horoscope-du-jour/",
  "items": [
    {
      "sign": "belier",
      "name": "Bélier",
      "text": "Prenez du recul face aux malentendus pour mieux avancer."
    }
  ]
}

Security

The plugin uses WordPress APIs to:

  • sanitize and validate widget, block, and API data;
  • escape rendered output;
  • restrict API endpoints to allowed HTTPS AstroAstro hosts by default;
  • use the WordPress HTTP API for outbound requests;
  • clean plugin options, transients, and scheduled cron events during uninstall.

Installation

  1. Upload the astroastro-daily-horoscope folder to /wp-content/plugins/.
  2. Activate the plugin from the WordPress Plugins screen.
  3. Go to Appearance > Widgets and add the “AstroAstro Daily Horoscope” widget to the desired widget area.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“AstroAstro Daily Horoscope” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial release.