Weather Block
A WordPress block plugin that displays current weather conditions for user-specified locations.
by The WordPress Contributors · github.com/adamsilverstein/wp-weather-block-2
★ 1stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/adamsilverstein/wp-weather-block-2/archive/refs/heads/main.zipFrom the readme
Weather Block WordPress Plugin
A modern WordPress block plugin that displays current weather conditions for user-specified locations using the OpenWeatherMap API.
Features
- 🌤️ Real-time Weather Data: Fetches current weather conditions from OpenWeatherMap API
- 🎨 Theme Support: Light, Dark, and Auto modes that respect system preferences
- 🌡️ Temperature Units: Support for both Celsius and Fahrenheit
- ⚡ Performance Optimized: 15-minute server-side caching to minimize API calls
- 🔒 Security First: Proper nonces, data sanitization, and secure API handling
- ♿ Accessible: WCAG 2.1 AA compliant with screen reader support
- 📱 Responsive: Mobile-friendly design that works on all devices
- 🌍 Internationalized: Full translation support for multiple languages
- 🧪 Well Tested: Comprehensive test suite with 80%+ code coverage
Requirements
- WordPress 6.0 or higher
- PHP 7.4 or higher
- OpenWeatherMap API key (free tier available)
Installation
From Source
1. Clone this repository:
2. Install dependencies:
3. Build the plugin:
4. Configure your API key in weather-block.php:
5. Create a distribution package:
WordPress Installation
1. Upload the plugin files to /