Celestial Lunar Phase Widget
Display lunar phase, moonrise, moonset, illumination, and astronomical twilight with local calculations and bundled imagery.
Install in
Celestial Lunar Phase Widget helps WordPress sites display the current Moon phase in a polished astronomy card.
The plugin shows:
- Current lunar phase name
- Moonrise time
- Moonset time
- Astronomical dawn time
- Astronomical dusk time
- Illumination percentage
- Bundled Moon phase image matched to the phase
- Optional location label
- Optional calculation/source note
Version 2.3 uses local astronomy calculations and adds automatic Moon image orientation by hemisphere. The plugin can rotate the bundled lunar imagery for Northern Hemisphere observers, with manual Northern, Southern, and Original orientation overrides in Settings.
Key features
- Local astronomy calculations; no API key required
- Moonrise and moonset times
- Astronomical dawn and dusk display
- Current lunar phase and illumination percentage
- Bundled Moon phase photos packaged locally
- Location lookup helper for admin setup
- Browser geolocation helper for admin setup
- Timezone dropdown to prevent typos and date-shift errors
- Latitude, longitude, timezone, and optional elevation settings
- Shortcode:
[celestial_lunar_phase_widget] - Gutenberg block: Celestial Lunar Phase Widget
- 12-hour or 24-hour time display
- Per-location and per-date caching for better performance
- Admin notice after update if location settings need to be completed
- Automatic Moon image orientation based on configured latitude
- Manual Northern Hemisphere, Southern Hemisphere, and Original image orientation options
Support
Support and documentation are available at:
https://celestialwebdevelopment.com/lunar-phase-plugin/
External Services
This plugin performs all lunar phase, moonrise, moonset, astronomical dawn, and astronomical dusk calculations locally. It does not send visitor data to an astronomy API.
The optional Lookup Location button on the admin settings page uses the OpenStreetMap Nominatim geocoding service to convert a place name into latitude and longitude. This lookup is only triggered by an administrator clicking the button in wp-admin. The query entered by the administrator is sent to Nominatim for geocoding. The service may receive the searched location text, your site’s server IP address, and standard request metadata.
Service provider: OpenStreetMap Nominatim
Terms: https://operations.osmfoundation.org/policies/nominatim/
Privacy: https://osmfoundation.org/wiki/Privacy_Policy
The Use My Current Location button uses the browser’s built-in geolocation prompt. Coordinates are only saved after the administrator clicks Save Changes.
Calculation details
Version 2.3.1 calculates lunar position using a bundled Meeus periodic series. Today’s phase and illumination are evaluated at the current UTC 15-minute reference bucket and displayed for the configured observing timezone. For explicitly requested past or future dates, phase and illumination refer to local noon. The optional calculation note identifies the reference time. Normal WordPress page caches may retain older rendered output until their expiry.
Moonrise and moonset refer to the stated local calendar day; a morning moonset may precede the afternoon moonrise on that same date. Calculations use a standard level horizon, lunar radius, parallax and a standard refraction allowance. Saved elevation is not currently applied. Local terrain and actual atmospheric conditions are not modeled.
Lunar periodic-series implementation adapted from Sonia Keys’ MIT-licensed Meeus library. Legacy SunCalc-derived helpers retain the BSD-2-Clause notice. Full notices and source references are included in CREDITS.txt and includes/. No external astronomy request, API key or paid account is required.
Written by Joobi from the project's own listing. See the source page
2.3.1
- Replaced the simplified lunar orbit with a full local Meeus periodic-series calculation.
- Added topocentric parallax, varying lunar radius and a standard horizon/refraction model for rise/set.
- Fixed First Quarter and Last Quarter labeling on both sides of each quarter phase.
- Today’s phase/illumination uses a 15-minute reference bucket; other requested dates use local noon. The optional calculation note identifies the reference time.
- Fixed event searches across 23-hour and 25-hour daylight-saving days.
- Updated cache keys/expiry so old snapshots do not mask the corrected calculation.
- Preserved valid zero coordinates, existing settings, block, shortcodes and styles.
- Included third-party calculation notices and removed production debug logging.
2.3.0
- Added automatic moon image orientation based on hemisphere.
- Added manual orientation options (Automatic, Northern Hemisphere, Southern Hemisphere, Original).
- Improved WordPress.org metadata (5 tags, shorter description).
- Tested up to WordPress 7.0.
- Various usability improvements.
2.2.3
- Updated WordPress compatibility and plugin header metadata.
- Removed production debug logging flagged by the Plugin Check tool.
- Added translator context for the localized calculation credit.
- Limited directory tags and shortened the plugin description.
2.2.0
- Added Location Lookup helper using OpenStreetMap Nominatim from the admin settings page.
- Added timezone dropdown with common timezones and all IANA timezone identifiers.
- Improved setup guidance and admin notice language for upgrades from API-based versions.
- Kept local astronomy calculations only; WeatherAPI remains removed.
2.1.0
- Removed WeatherAPI mode and API key settings.
- Added local-only astronomy calculations.
- Added admin notice when latitude, longitude, or timezone settings are missing after update.
- Kept browser geolocation helper for easier setup.
- Updated branding and documentation for Celestial Web Development.
2.0.9
- Fixed local date handling for the configured observing timezone.
- Shortened astronomical twilight labels to Dawn and Dusk.
2.0.8
- Improved moonrise and moonset calculations using a SunCalc-style algorithm.
- Improved phase and illumination calculation.
2.0.2
- Added local calculation diagnostics and safer timezone handling.
2.0.0
- Added local astronomy calculation mode for moonrise and moonset.
- Changed local sun times display to astronomical dawn and astronomical dusk.
- Added latitude, longitude, timezone, and elevation settings.
- Added browser geolocation helper in admin.
1.1.0
- Added Gutenberg block support.
- Added bundled WordPress.org assets and screenshots.
1.0.0
- Initial release.
Follow this listing's changes (Atom feed)