SolarDawn Sunrise & Sunset Widget
SolarDawn Sunrise & Sunset Widget adds a responsive frontend card for sunrise and sunset information. It works in posts, pages, widget areas, Gutenberg shortcode blocks, and page builders through the [solardawn_sunrise_sunset] shortcode. The widget can use a default country/state/city dropdown selec
SolarDawn Sunrise & Sunset Widget adds a responsive frontend card for sunrise and sunset information. It works in posts, pages, widget areas, Gutenberg shortcode blocks, and page builders through the [solardawn_sunrise_sunset] shortcode.
The widget can use a default country/state/city dropdown selection, manual latitude/longitude, shortcode location attributes, or optional visitor country detection by public IP. Sunrise, sunset, twilight, and daylight details are calculated locally from the selected coordinates and timezone, then cached with WordPress transients.
Features include:
- Sunrise and sunset times
- Solar noon
- Day length
- Golden hour morning and evening
- Blue hour morning and evening
- Civil, nautical, and astronomical twilight
- Light, dark, and sunrise gradient themes
- Country, state, and city dropdowns generated from the bundled location JSON
- Automatic latitude, longitude, and timezone detection from selected locations
- Optional visitor country detection, disabled by default
Shortcode Examples
Default settings:
[solardawn_sunrise_sunset]
Country:
[solardawn_sunrise_sunset country="Sri Lanka"]
Country, state, and city without manual coordinates:
[solardawn_sunrise_sunset country="Sri Lanka" state="Western" city="Colombo"]
City search within a country:
[solardawn_sunrise_sunset country="Japan" city="Tokyo"]
Manual coordinates:
[solardawn_sunrise_sunset lat="6.9271" lon="79.8612" timezone="Asia/Colombo"]
Custom title:
[solardawn_sunrise_sunset country="United States" title="Today's Sun Times"]<h3>Privacy</h3>
This plugin calculates sunrise and sunset data locally from the selected latitude, longitude, timezone, and date.
Visitor country detection is disabled by default. When an administrator enables visitor country detection, the plugin sends the visitor IP address to ipapi.co to estimate the visitor’s country. If visitor country detection is disabled, no request is sent to ipapi.co.