| 开发者 | proodos |
|---|---|
| 更新时间 | 2026年7月6日 04:31 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 |
| 版权网址: | 版权信息 |
[pdsweather] shortcode in any post or page.<?php echo pdsweather_display(); ?> in your theme template.pdsWeather() is still supported for backward compatibility.pdsweather folder to /wp-content/plugins/.<?php echo pdsweather_display(); ?> in your templates.Sign up for a free account at OpenWeatherMap and create an API key. The free tier allows up to 1,000 calls per day.
Weather Underground shut down their free API in 2019. Version 4.0 of this plugin uses OpenWeatherMap instead. Simply enter your new OpenWeatherMap API key in the settings.
The plugin caches data for one hour to minimize API calls.
js/pdsweather-theme.js) detects the browser preference and sets a data-theme attribute on the widget; the stylesheet themes the widget from that attribute. When JavaScript is disabled, the plugin falls back to the prefers-color-scheme media query (OS preference).prefers-color-scheme — the widget colors adapt to the visitor's system theme. Implemented with CSS custom properties for easy theming.pdsweather_custom_css option and loaded on the front end via wp_add_inline_style()). Includes nonce verification, capability check and sanitization.uninstall.php now removes the new options (pdsweather_show_aqi, pdsweather_show_uv, pdsweather_custom_css).uvi field; otherwise it is silently skipped.[pdsweather] shortcode for easy embedding in posts and pages..pdsweather-city CSS class for city name styling.