Linux 软件免费装
Banner图

TK Event Weather

开发者 cliffpaulick
更新时间 2020年12月22日 02:58
PHP版本: 5.6 及以上
WordPress版本: 5.6
版权: GPL version 3 or any later version
版权网址: 版权信息

标签

calendar shortcode events weather forecast

下载

1.0 1.6.6

详情介绍:

Display beautiful, accurate, and free hourly weather forecasts between a start and end time on the same day. Perfect for event calendars. Includes sunrise, sunset, temperature, wind speed and direction, and is very customizable. https://www.youtube.com/watch?v=KXyWZrfgL4k https://www.youtube.com/watch?v=fbGS_LtX-es Highlights Paid Add-Ons Currently Available: I am considering making add-ons for the following event calendars: Additional add-on ideas: I'll consider making whichever add-ons I receive the most requests for (and are technically feasible) so please share your request via the plugin settings' built-in Feature Request form! 笔记 Support Me

安装:

After automatically or manually installing to wp-content/plugins/:
  1. 启用这个插件
  2. Navigate to this plugin's Settings page (wp-admin > Settings > TK Event Weather)
  3. Click the "Edit Plugin Settings in WP Customizer" button to enter your Dark Sky API key and setup any other available settings.
  4. Then use the shortcode however you wish throughout your site (will require manually entering latitude and longitude) or install one of our add-ons to make it easy to integrate with your event calendar.

屏幕截图:

  • Plugin settings screen with convenient link to plugin options in the WordPress Customizer
  • Plugin options screenshot 1 of 3
  • Plugin options screenshot 2 of 3
  • Plugin options screenshot 3 of 3
  • Example output from the "min-max / low-high" template (excluding heading text)
  • Example output from the "Hourly Vertical" template (excluding heading text)
  • Example output from the "Hourly Horizontal" template (excluding heading text)
  • Example output to Administrators when an invalid shortcode argument is used. Points out which argument was invalid.
  • A view of the Freemius links to your Freemius Account, the plugin Contact Us form, the WordPress.org Support Forum, and easy access to paid add-ons.

常见问题:

What shortcodes are available?

[tk_event_weather]

What are some shortcode examples?

  1. Weather for the White House on February 1, 2016, from 4:30pm–9:45pm Eastern Time:
A) with single Latitude/Longitude shortcode argument and ISO 8601 datetime format [tk_event_weather lat_long="38.897676,-77.03653" start_time="2016-02-01T16:30:00-05:00" end_time="2016-02-01T21:45:00-05:00"] B) or separate shortcode arguments for Latitude and Longitude [tk_event_weather lat="38.897676" long="-77.03653" start_time="2016-02-01T16:30:00-05:00" end_time="2016-02-01T21:45:00-05:00"] C) or with Unix timestamps [tk_event_weather lat_long="38.897676,-77.03653" start_time="1454362200" end_time="1454381100"] D) Just like Example A but with Location shortcode argument (a Place name) -- available since version 1.2.0 [tk_event_weather location="The White House" start_time="1454362200" end_time="1454381100"] E) Just like Example D but with Location shortcode argument (a full address) -- available since version 1.2.0 [tk_event_weather location="1600 Pennsylvania Ave NW, Washington, DC 20500, USA" start_time="1454362200" end_time="1454381100"] F) Displaying more than one day in a sequence (multiple API calls but appear all together), like this screenshot [tk_event_weather lat_long='28.5549259,-81.3342398' start_time='2016-08-27T22:00:00-04:00' end_time='2016-08-27T23:59:00-04:00' class='tkeventw-myclass'] [tk_event_weather lat_long='28.5549259,-81.3342398' start_time='2016-08-28T00:00:00-04:00' end_time='2016-08-28T04:30:00-04:00' class='tkeventw-myclass' darksky_credit_link_off='true'] And then add some custom CSS, like this: .tkeventw-myclass { display: inline-block; vertical-align: top; } G) To display from 4:30pm through the remainder of the day (do not set the end_time) [tk_event_weather lat_long="38.897676,-77.03653" start_time="2016-02-01T16:30:00-05:00"] H) To display only 4:00pm's weather, set end_time to the same [tk_event_weather lat_long="38.897676,-77.03653" start_time="2016-02-01T16:00:00-05:00" end_time="2016-02-01T16:00:00-05:00" sunrise_sunset_off="true"] I) To display Today's weather from 6am - 7pm, begin the start_time and end_time shortcode arguments at the "T" part of the ISO 8601 format. Note that you will likely need to edit the shortcode twice per year to accurately reflect the location's Daylight Savings Time (DST) UTC offset. [tk_event_weather location="The White House" start_time=T06:00:00-0400 end_time=T19:00:00-04:00 before="Today's Forecast"] J) To display the weather from right now through the next 3 hours. NOTE: end_time is relative to start_time, not to "now" (unless start_time is set to "now"). [tk_event_weather location="The White House" start_time="now" end_time="+3 hours"] Example: At 12:06pm, this shortcode will display 12pm, 1pm, 2pm, 3pm, and 4pm (5 hours, possibly more if sunrise or sunset) -- because the shortcode always "bookends" the hours -- so it rounds 12:06pm down to 12:00 and rounds 3:06pm up to 4:00pm. So if you'd like only 12pm, 1pm, and 2pm to be displayed, you could add class="max-3" to the shortcode and then also add this CSS: .tk-event-weather__wrapper.max-3 .template-hourly_horizontal__item:nth-of-type(1n+4) { display: none; }

Will this plugin work with my theme?

This plugin will work with any properly-coded WordPress theme. Free styling / customization help to integrate with your theme is not available from the plugin author.

What system specs are required?

This plugin requires WordPress version 4.3.0 or later. It is always recommended to use the latest version of WordPress for compatibility, performance, and security reasons. This plugin may not work properly with PHP versions earlier than 5.6. You should meet or exceed the WordPress recommended software specs for best performance and security. Any of this plugin's add-ons for specific event calendars would require the latest version of each add-on plugin and each event calendar plugin.

How accurate are the forecasts?

Basically, accuracy is a high priority. Here are quotes from the Dark Sky API docs:

  • "The Dark Sky API is backed by a wide range of data sources, which are aggregated together to provide the most accurate forecast possible for a given location."
  • "Most of our sources focus on the USA and UK, and these areas are best supported by our API. We have plans to greatly improve our international forecasts in the near future."

更新日志:

Version 1.6.6 Version 1.6.5 Version 1.6.4 Version 1.6.3 Version 1.6.2 Version 1.6.1 Version 1.6.0 Version 1.5.4 Version 1.5.3 Version 1.5.2 Version 1.5.1 Version 1.5.0 Tweaks: Bug fixes: Version 1.4.6 Version 1.4.5 Version 1.4.4 Version 1.4.3 Version 1.4.2 Version 1.4.1 Version 1.4 Version 1.3.1 Version 1.3 Version 1.2.6 Version 1.2.5 Version 1.2.4 Version 1.2.3.3 Version 1.2.3.2 Version 1.2.3.1 Version 1.2.3 Version 1.2.2 Version 1.2.1 Version 1.2.0 Version 1.1 Version 1.0