Changeset 2481913
- Timestamp:
- 02/26/2021 01:53:53 AM (5 years ago)
- Location:
- weekly-shabbat-times/trunk
- Files:
-
- 2 edited
-
hebcal-json.php (modified) (3 diffs)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
weekly-shabbat-times/trunk/hebcal-json.php
r1933365 r2481913 4 4 * Plugin URI: http://aaronreimann.com 5 5 * Description: Grabs JSON string from hebcal.com and enables shortcodes display the information dynamically 6 * Version: 1. 0.06 * Version: 1.1.0 7 7 * Author: areimann, jfennell 8 8 */ … … 22 22 } 23 23 24 static function fetch( $zip ) {24 static function fetch( $zip, $longitude, $latitude, $tzid ) { 25 25 $json_obj = get_transient( 'hebcal_json' ); 26 26 if ( ! $json_obj ) { 27 27 28 $url = 'http://www.hebcal.com/shabbat/?cfg=json&zip=' . $zip; 28 if ( $zip != NULL ) { 29 $url = 'https://www.hebcal.com/shabbat/?cfg=json&zip=' . $zip; 30 } else { 31 $url = 'https://www.hebcal.com/shabbat/?cfg=json&geo=pos&longitude=' . $longitude . '&latitude=' . $latitude . '&tzid=' .$tzid; 32 } 29 33 30 34 $json_string = file_get_contents( $url ); … … 42 46 'param' => 'title', 43 47 'category' => 'parashat', 44 'zip' => '10001' // Zip in New York as default 48 'zip' => '', 49 'longitude' => '', 50 'latitude' => '', 51 'tzid' => '' 45 52 ), $atts ); 46 53 47 $json_obj = self::fetch( $atts['zip'] ); 54 $json_obj = self::fetch( $atts['zip'], $atts['longitude'], $atts['latitude'], $atts['tzid'] ); 55 48 56 49 57 $string = ''; -
weekly-shabbat-times/trunk/readme.txt
r1933365 r2481913 2 2 Contributors: areimann, jfennell 3 3 Donate link: http://aaronreimann.com 4 Tags: 4 Tags: Shabbat 5 5 Requires at least: 4.7 6 Tested up to: 4.9.87 Stable 1. 0.06 Tested up to: 5.6.2 7 Stable 1.1.0 8 8 Stable tag: trunk 9 9 License: GPLv2 or later … … 23 23 24 24 = What does it do? = 25 26 It simple gives a few shortcodes to display the Shabbat lighting times. Watch the video to see what it does: 25 27 [youtube https://www.youtube.com/watch?v=ztzHENB9g7Y] 26 28 … … 31 33 = How do I use it? = 32 34 33 Example shortcodes :35 Example shortcodes using Zip Code: 34 36 35 37 [hebcal_sc category="parashat" param="title" zip="30066"] … … 39 41 [hebcal_sc category="candles" param="title" zip="30066"] 40 42 [hebcal_sc category="candles" param="hebrew" zip="30066"] 43 44 Example shortcode using Longitude, Latitude, and Time Zone ID: 45 46 [hebcal_sc category="candles" param="title" longitude="-84.500434" latitude="34.024356" tzid="America/New_York"] 47 48 You can get a list of timezone ID's by going to [https://en.wikipedia.org/wiki/List_of_tz_database_time_zones]https://en.wikipedia.org/wiki/List_of_tz_database_time_zones 49 41 50 42 51 = Possible categories from the feed = … … 53 62 == Changelog == 54 63 64 = 1.1.0 = 65 * Adds longitude and latitude to the shortcode so you can drop in your longitude, latitude, and timezone ID. 66 55 67 = 1.0.0 = 56 68 * Initial release
Note: See TracChangeset
for help on using the changeset viewer.