{"id":320055,"date":"2026-06-05T16:47:06","date_gmt":"2026-06-05T16:47:06","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/4wp-weather-weather-forecast-block\/"},"modified":"2026-06-05T16:45:39","modified_gmt":"2026-06-05T16:45:39","slug":"4wp-weather","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/4wp-weather\/","author":17741300,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.0","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"4WP Weather","header_author":"4wpdev","header_description":"Pluggable weather providers, Gutenberg block, server-side cached fetches, admin credentials, REST API, and WP-CLI cache flush.","assets_banners_color":"","last_updated":"2026-06-05 16:45:39","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/4wp.dev\/","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":24,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"4wpdev","date":"2026-06-05 16:45:39"}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":{"forwp\/weather":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"forwp\/weather","version":"1.0.0","title":"4WP Weather","category":"widgets","icon":"cloud","description":"Weather snippet with pluggable providers (OpenWeatherMap live; others registered as roadmap stubs).","keywords":["weather","forecast","openweathermap"],"textdomain":"4wp-weather","supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true},"color":{"background":true,"text":true,"gradients":true},"typography":{"fontSize":true,"fontFamily":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"letterSpacing":true,"textDecoration":true,"textTransform":true},"border":{"color":true,"radius":true,"style":true,"width":true}},"attributes":{"latitude":{"type":"number","default":50.75},"longitude":{"type":"number","default":25.34},"useBrowserGeolocation":{"type":"boolean","default":true},"browserGeoTrigger":{"type":"string","default":"auto","enum":["auto","button"]},"showLocationSearch":{"type":"boolean","default":false},"provider":{"type":"string","default":"openweathermap"},"showLocationName":{"type":"boolean","default":true},"showTemperature":{"type":"boolean","default":true},"showFeelsLike":{"type":"boolean","default":true},"showCondition":{"type":"boolean","default":true},"showHumidity":{"type":"boolean","default":true},"showPressure":{"type":"boolean","default":true},"showWindSpeed":{"type":"boolean","default":true},"showSunrise":{"type":"boolean","default":true},"showSunset":{"type":"boolean","default":true}},"editorScript":"file:.\/index.js","style":"file:.\/style-index.css","viewScript":"file:.\/view.js","render":"file:.\/render.php"}},"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Weather block on the front end","2":"Providers tab with API key and preview","3":"Block in the editor"}},"plugin_section":[],"plugin_tags":[1220,4900,148076,10469,4899],"plugin_category":[59],"plugin_contributors":[262731,262732],"plugin_business_model":[],"class_list":["post-320055","plugin","type-plugin","status-publish","hentry","plugin_tags-block","plugin_tags-forecast","plugin_tags-gutenberg","plugin_tags-openweathermap","plugin_tags-weather","plugin_category-utilities-and-tools","plugin_contributors-4wpdev","plugin_contributors-anatolikkk","plugin_committers-4wpdev"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/4wp-weather.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>4WP Weather<\/strong> adds a block for current conditions on your site. Choose a provider, store your API key in WordPress (never in the browser), and load data through the REST API with server-side caching.<\/p>\n\n<p>A plugin by <a href=\"https:\/\/4wp.dev\/\">4wp.dev<\/a>. <strong>4WP<\/strong> is our project brand; the letters \"WP\" appear only as part of that brand name, not as a reference to WordPress. This plugin is not affiliated with, endorsed, or sponsored by WordPress.<\/p>\n\n<p>Source code and releases: <a href=\"https:\/\/github.com\/4wpdev\/4wp-weather\">github.com\/4wpdev\/4wp-weather<\/a><\/p>\n\n<h4>Development<\/h4>\n\n<p>JavaScript and CSS are built with <code>@wordpress\/scripts<\/code>. The plugin ZIP includes human-readable source (<code>src\/<\/code>, <code>package.json<\/code>, <code>webpack.config.js<\/code>) plus compiled <code>build\/<\/code>. The same tree is mirrored on GitHub for development and releases.<\/p>\n\n<ol>\n<li><code>cd<\/code> into the plugin directory<\/li>\n<li><code>npm install<\/code><\/li>\n<li><code>npm run build<\/code> \u2014 outputs <code>build\/weather\/<\/code> and <code>build\/admin\/<\/code><\/li>\n<\/ol>\n\n<h4>Key features<\/h4>\n\n<ul>\n<li>Gutenberg block <code>forwp\/weather<\/code> with OpenWeatherMap (more providers on the roadmap)<\/li>\n<li>React admin: <strong>Providers<\/strong> (API key, live preview) and <strong>Documentation<\/strong><\/li>\n<li>Server-side upstream requests; optional <strong>JSON-LD<\/strong> (<code>Observation<\/code>)<\/li>\n<li>WP-CLI: <code>wp forwp-weather flush-cache<\/code><\/li>\n<\/ul>\n\n<h4>Privacy<\/h4>\n\n<p>The API key is stored as a WordPress option and is not exposed to front-end HTML or JavaScript. The block calls <code>forwp-weather\/v1\/weather<\/code>; PHP performs the remote request. See <strong>External services<\/strong> below for what is sent to OpenWeatherMap.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to the <strong>OpenWeatherMap Current Weather API<\/strong> to fetch conditions shown in the weather block, admin live preview, and optional JSON-LD.<\/p>\n\n<p>When a visitor loads a page with the block (or when an administrator uses the live preview), WordPress sends a <strong>server-side<\/strong> HTTPS request to <code>https:\/\/api.openweathermap.org\/data\/2.5\/weather<\/code>. The request includes:<\/p>\n\n<ul>\n<li>Your stored API key (<code>appid<\/code> query parameter), configured in the admin.<\/li>\n<li>Either geographic coordinates (<code>lat<\/code>, <code>lon<\/code>) from the block attributes, from browser geolocation when the visitor allows it, or a default location you configure.<\/li>\n<li>Or a city name (<code>q<\/code>) when a text location is configured instead of coordinates.<\/li>\n<\/ul>\n\n<p>This plugin does not send visitor IP addresses in the API request. OpenWeatherMap may log requests according to their own policies. Responses are cached on your server (WordPress transients) to reduce repeat API calls.<\/p>\n\n<p>This service is provided by <strong>OpenWeather Ltd.<\/strong> (OpenWeatherMap):<\/p>\n\n<ul>\n<li>Terms of use: https:\/\/openweathermap.org\/terms<\/li>\n<li>Privacy policy: https:\/\/openweather.co.uk\/privacy-policy<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin to <code>\/wp-content\/plugins\/4wp-weather\/<\/code> or install from the Plugins screen.<\/li>\n<li>Activate <strong>4WP Weather<\/strong>.<\/li>\n<li>Open <strong>4WP Weather<\/strong> in the admin menu \u2192 <strong>Providers<\/strong>, set provider and API key, then save.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20the%20api%20key%20appear%20in%20the%20browser%3F\"><h3>Does the API key appear in the browser?<\/h3><\/dt>\n<dd><p>No. Only WordPress talks to the weather API using the stored key.<\/p><\/dd>\n<dt id=\"is%20json-ld%20required%3F\"><h3>Is JSON-LD required?<\/h3><\/dt>\n<dd><p>No. Enable it under <strong>Documentation<\/strong> if you want structured data on public pages. There is no guarantee of rich results in search engines.<\/p><\/dd>\n<dt id=\"which%20providers%20work%20today%3F\"><h3>Which providers work today?<\/h3><\/dt>\n<dd><p><strong>OpenWeatherMap<\/strong> is live. Additional providers are registered for future releases.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: weather block, OpenWeatherMap, REST API, cache, admin UI, optional JSON-LD.<\/li>\n<\/ul>","raw_excerpt":"Gutenberg weather block with pluggable providers, server-side API calls, and optional JSON-LD.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/320055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=320055"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/4wpdev"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=320055"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=320055"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=320055"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=320055"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=320055"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=320055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}