# Celestial Lunar Phase Widget

A WordPress plugin that displays the current lunar phase with a bundled moon image, phase name, moonrise, moonset, astronomical twilight, and illumination using local astronomy calculations.

This repository is organized for GitHub version control and WordPress plugin development.

## Features

- Current lunar phase name
- Moonrise and moonset times
- Illumination percentage
- Bundled moon phase images
- Shortcode support: `[lunar_phase_widget]`
- Dynamic Gutenberg block
- Settings for location, timezone, title, time format, and Moon image orientation
- Cached local calculations for better performance

## Repository Layout

```text
lunar_phase_plugin/
├── .github/
│   └── workflows/
│       └── release-zip.yml
├── docs/
│   ├── DEVELOPMENT.md
│   ├── GIT-SETUP.md
│   ├── RELEASE-CHECKLIST.md
│   └── WORDPRESS-ORG-NOTES.md
├── assets/                  # Created by the plugin package when present
├── CREDITS.txt
├── celestial-lunar-phase.php
├── readme.txt               # WordPress.org readme
├── LICENSE
├── .gitignore
└── README.md                # GitHub repo documentation
```

## Requirements

- WordPress 6.0+
- Tested up to WordPress 7.0
- PHP 7.4+
- Configured latitude, longitude, and timezone

## Local Development

1. Copy this plugin folder into your local WordPress install under `wp-content/plugins/`.
2. Activate **Celestial Lunar Phase Widget** in the WordPress admin.
3. Go to **Settings > Celestial Lunar Phase**.
4. Set your observing location and timezone, then choose automatic or manual Moon image orientation.

## GitHub Workflow

This repo includes a sample GitHub Actions workflow that creates a ZIP artifact from the repository contents when you push a tag beginning with `v`.

## Support

- Website: https://celestialwebdevelopment.com/
- Plugin page: https://celestialwebdevelopment.com/lunar-phase-plugin/

## License

GPL-2.0-or-later

## Release v2.3.0

Release Celestial Lunar Phase Widget v2.3.0

== Changelog ==

= 2.3.0 =
* Added automatic moon image orientation based on hemisphere.
* Added manual orientation options: Automatic, Northern Hemisphere, Southern Hemisphere, and Original.
* Improved WordPress.org metadata with 5 tags and a shorter description.
* Tested up to WordPress 7.0.
* Various usability improvements.

== Upgrade Notice ==

= 2.3.0 =
Adds hemisphere-based Moon image orientation with manual options and improves WordPress.org metadata and usability.
