Changeset 1950349
- Timestamp:
- 10/02/2018 04:15:34 PM (7 years ago)
- Location:
- tfl-widgets
- Files:
-
- 3 added
- 4 edited
-
assets/screenshot-3.jpg (added)
-
assets/screenshot-4.jpg (added)
-
trunk/README.txt (modified) (6 diffs)
-
trunk/includes/class-jel-tfl-widgets-wp-widget.php (added)
-
trunk/includes/class-jel-tfl-widgets.php (modified) (3 diffs)
-
trunk/jel-tfl-widgets.php (modified) (1 diff)
-
trunk/public/class-jel-tfl-widgets-public.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tfl-widgets/trunk/README.txt
r1943283 r1950349 5 5 Requires at least: 4.4.8 6 6 Tested up to: 4.9.8 7 Stable tag: 1.0.1 7 Requires PHP: 5.6.32 8 Stable tag: 1.2 8 9 License: GPLv2 or later 9 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 13 14 == Description == 14 15 15 TFL Widgets lets you add Transport For London widgets to your pages using WordPress "shortcodes". This plugin is not created or endorsed by Transport For London. 16 Now with Widget support!!! 16 17 17 Simply install the plugin, then you can add the shortcodes as follows: 18 TFL Widgets lets you add Transport For London widgets to your pages using WordPress "shortcodes" or as a WordPress Widget. 19 20 Simply install the plugin, then you can add the shortcodes into pages/posts as follows: 18 21 19 22 #### Tube service updates … … 33 36 * `[tube-map width="variable"]` - Gives a Tube map of variable width which stretches to fit its container. 34 37 38 You can also drag & drop the TFL Widgets widget into your Blog Sidebar or Footer from Appearance/Widgets in the WordPress Admin. Woohoo! 39 35 40 == Installation == 36 41 … … 49 54 2. Tube map (`[tube-map]`) 50 55 56 3. You can drag the Widget into your... 57 58 4. ... Sidebar or Footer 59 51 60 == Changelog == 52 61 … … 55 64 = 1.0.1 = 56 65 * Bug fix for fixed width tube map not working 66 = 1.2 = 67 * Widget support added 57 68 58 69 == Upgrade Notice == … … 63 74 64 75 Please refer to TFL's [transport data terms and conditions](https://tfl.gov.uk/corporate/terms-and-conditions/transport-data-service) for the terms of use of the data provided from this plugin 76 77 This plugin is not created or endorsed by Transport For London. -
tfl-widgets/trunk/includes/class-jel-tfl-widgets.php
r1636217 r1950349 70 70 71 71 $this->plugin_name = 'jel-tfl-widgets'; 72 $this->version = '1. 0.0';72 $this->version = '1.2'; 73 73 74 74 $this->load_dependencies(); … … 120 120 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-jel-tfl-widgets-public.php'; 121 121 122 /** 123 * The class responsible for adding a WP Widget 124 */ 125 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jel-tfl-widgets-wp-widget.php'; 126 122 127 $this->loader = new Jel_Tfl_Widgets_Loader(); 123 128 … … 168 173 $plugin_public = new Jel_Tfl_Widgets_Public( $this->get_plugin_name(), $this->get_version() ); 169 174 170 //$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); 171 //$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); 175 //$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); 172 176 $this->loader->add_action( 'init', $plugin_public, 'register_shortcodes' ); 177 $this->loader->add_action( 'widgets_init', $plugin_public, 'register_WP_widget' ); 173 178 174 179 } -
tfl-widgets/trunk/jel-tfl-widgets.php
r1642635 r1950349 16 16 * Plugin Name: TFL Widgets 17 17 * Plugin URI: http://jelnet.uk/wp-plugins/tfl-widgets 18 * Description: TFL Widgets lets you add Transport For London widgets to your pages using WordPress "shortcodes" .19 * Version: 1. 0.118 * Description: TFL Widgets lets you add Transport For London widgets to your pages using WordPress "shortcodes" or as a WordPress Widget. 19 * Version: 1.2 20 20 * Author: Jeremy Wray 21 21 * Author URI: http://jeremywray.co.uk/ -
tfl-widgets/trunk/public/class-jel-tfl-widgets-public.php
r1642635 r1950349 112 112 ), $atts, 'tube-updates' ); 113 113 if ($atts['width'] == "variable") { 114 return '< script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/serviceboard/embeddable/serviceboard-iframe-stretchy.js"></script>';114 return '<div class="tfl-widgets-tube-updates"><script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/serviceboard/embeddable/serviceboard-iframe-stretchy.js"></script></div>'; 115 115 } else { 116 return '<div style="width:' . $atts['width'] . '"><script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/serviceboard/embeddable/serviceboard-iframe-stretchy.js"></script></div>';116 return '<div class="tfl-widgets-tube-updates" style="width:' . $atts['width'] . '"><script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/serviceboard/embeddable/serviceboard-iframe-stretchy.js"></script></div>'; 117 117 } 118 118 } … … 124 124 ), $atts, 'tube-map' ); 125 125 if ($atts['width'] == "variable") { 126 return '< script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/tubemap/tubemap-iframe-stretchy.js"></script>';126 return '<div class="tfl-widgets-tube-map"><script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/tubemap/tubemap-iframe-stretchy.js"></script></div>'; 127 127 } else { 128 return '<div style="width' . $atts['width'] . '"><script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/tubemap/tubemap-iframe-stretchy.js"></script></div>';128 return '<div class="tfl-widgets-tube-map" style="width:' . $atts['width'] . '"><script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/tubemap/tubemap-iframe-stretchy.js"></script></div>'; 129 129 } 130 130 } … … 142 142 //add_shortcode( 'anothershortcode', array( $this, 'another_shortcode_function') ); 143 143 } 144 /** 145 * Jel: register the WP Widget. 146 * 147 * @since 1.2 148 */ 149 public function register_WP_widget() { 150 register_widget( 'jel_tfl_WP_widget' ); 151 } 144 152 145 153 }
Note: See TracChangeset
for help on using the changeset viewer.