Changeset 1410613
- Timestamp:
- 05/04/2016 09:52:11 PM (10 years ago)
- Location:
- responsive-video-light/trunk
- Files:
-
- 2 added
- 2 deleted
- 2 edited
-
readme.txt (modified) (5 diffs)
-
responsive-video-light.php (modified) (3 diffs)
-
templates/rvl_plugin_options.php (added)
-
templates/rvl_plugin_options_head.php (added)
-
twig (deleted)
-
twig_cache (deleted)
Legend:
- Unmodified
- Added
- Removed
-
responsive-video-light/trunk/readme.txt
r1317605 r1410613 4 4 Requires at least: 3.0 5 5 Tested up to: 4.4 6 Stable tag: 1. 4.06 Stable tag: 1.5.0 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 16 16 * The ability to add one or more videos directly in to a page, post or any of your own custom post types using the video URL (not the embed code) or ID and a short code. Currently YouTube and Vimeo are supported, using the [responsive_youtube] and [responsive_vimeo] shortcodes, respectively. 17 17 * Fully responsive so the video's viewport will fill the width of the containing area and scale depending on screen size. No need to set a width and height, just set the width of the div your content sits in. 18 * YouTube videos have a shortcode attribute that lets you turn "related videos" on or off. "Related Videos" are the links that tile across the viewport when a video has completed playing. 18 * YouTube videos have a shortcode attribute that lets you turn "related videos" on or off. "Related Videos" are the links that tile across the viewport when a video has completed playing. 19 19 * YouTube videos also support light and dark themes, autoplaying, showinfo, and modest branding (which removes most YouTube brand imagery). 20 20 * Vimeo videos can have the video portrait, title, and byline shut off. … … 25 25 For a YouTube video, you can specify either the full URL to the video or just the unique video ID, like this: 26 26 27 [responsive_youtube http://www.youtube.com/watch?v=NbCr0UyoFJA ] 27 [responsive_youtube http://www.youtube.com/watch?v=NbCr0UyoFJA ] 28 28 [responsive_youtube NbCr0UyoFJA] 29 29 30 30 And if you want to specify whether or not you'd like the "related videos" to display, you can use the "rel" or "norel" parameters in the shortcode syntax, like this: 31 31 32 32 [responsive_youtube NbCr0UyoFJA norel] 33 33 [responsive_youtube NbCr0UyoFJA rel] … … 37 37 Similarly, for a Vimeo video, you can use the full video player URL or just the video ID, like this: 38 38 39 [responsive_vimeo https://vimeo.com/29506088 ] 39 [responsive_vimeo https://vimeo.com/29506088 ] 40 40 [responsive_vimeo 29506088] 41 41 42 42 There is a more complete treatment of the shortcode syntax in the settings screen of the plugin itself. 43 43 44 44 = Requirements = 45 45 46 * WordPress 3.0 + 46 * WordPress 3.0 + 47 47 48 48 == Installation == … … 79 79 80 80 == Changelog == 81 82 = 1.5.0 = 83 * Remove Twig templating altogether to resolve namespace collisions. Honestly, including the whole thing was a bit heavy-handed anyway - I didn't need but a tiny fraction of its functionality. Replaced with "native" PHP code. 81 84 82 85 = 1.4.0 = -
responsive-video-light/trunk/responsive-video-light.php
r1243683 r1410613 4 4 * Plugin URI: http://bitpusher.tk/responsive-video-light 5 5 * Description: A plugin to add responsive videos to pages and posts 6 * Version: 1. 4.06 * Version: 1.5.0 7 7 * Author: Bill Knechtel 8 8 * Author URI: http://bitpusher.tk … … 26 26 27 27 $base_path = plugin_dir_path(__FILE__); 28 require_once $base_path . '/twig/lib/Twig/Autoloader.php';29 30 Twig_Autoloader::register();31 $twig_loader = new Twig_Loader_Filesystem($base_path . '/templates');32 $twig = new Twig_Environment(33 $twig_loader,34 array('cache' => $base_path . '/twig_cache')35 );36 28 37 29 /** … … 128 120 function rvl_plugin_options() 129 121 { 130 global $ twig;122 global $base_path; 131 123 $options = get_option('rvl_options_field', array()); 132 124 133 125 // Plugin options 134 echo $twig->render('rvl_plugin_options_head.html');126 include $base_path . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'rvl_plugin_options_head.php'; 135 127 wp_nonce_field('update-options'); 136 128 settings_fields('rvl_options'); 137 echo $twig->render('rvl_plugin_options.html', $options);129 include $base_path . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'rvl_plugin_options.php'; 138 130 } 139 131
Note: See TracChangeset
for help on using the changeset viewer.