rsn weather
WordPress weather plugin featuring Settings API for security and Transients API for performance.
★ 0stars
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/rysan/rsnweather/archive/refs/heads/main.zipRSN Weather Dashboard
A performance-oriented WordPress plugin that integrates real-time weather data into the dashboard and frontend via shortcodes.
🚀 Technical Highlights
- Secure API Architecture: Utilizes the WordPress Settings API for credential management, including server-side sanitization callbacks.
- Performance Optimization: Implements the Transients API to cache external API responses, significantly reducing page load times and preventing API rate-limit exhaustion.
- Robust Data Fetching: Leverages the WordPress HTTP API (
wp_remote_get) for resilient asynchronous communication with the OpenWeatherMap API. - Developer Friendly: Modular architecture separating logic (
includes/), admin configuration (admin/), and UI templates (templates/).
🛠️ Usage
- Configure: Navigate to
rsn weatherin the admin menu and enter your OpenWeatherMap API Key. - Display: Use the shortcode
[rsn_weather city="London"]on any page or post.
📂 Project Structure
rsnweather.php: Main plugin entry point and hook initialization.includes/rsnweather-options.php: Core logic for API requests and transient management.includes/rsnweather-settings-fields.php: Settings API configuration and sanitization.templates/admin/settings-page.php: Dashboard UI for weather previews.