Changeset 1220553
- Timestamp:
- 08/14/2015 04:20:45 AM (11 years ago)
- Location:
- blrt-wp-embed
- Files:
-
- 3 added
- 2 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/blrt-wp-embed.php (added)
-
tags/1.0.1/readme.txt (added)
-
trunk/blrt-wp-embed.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
blrt-wp-embed/trunk/blrt-wp-embed.php
r1073065 r1220553 4 4 * Plugin URI: http://www.blrt.com/wordpress-plugin 5 5 * Description: Enable embedding Blrts in your pages and posts by simply pasting in the URL of a public or private Blrt - just like YouTube videos are embedded utilising oEmbed. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Author: Blrt 8 8 * Author URI: http://www.blrt.com … … 39 39 private function add_oembed_providers() { 40 40 $convertible_servers = $this->get_convertible_servers(); 41 $convertible_short_servers = $this->get_convertible_short_servers(); 41 42 $oembed_server = $this->get_oembed_server(); 42 43 43 if(!($convertible_servers && $ oembed_server)) return false;44 if(!($convertible_servers && $convertible_short_servers && $oembed_server)) return false; 44 45 45 46 $preg_convertible_servers = '(' . implode( '|', array_map( 'preg_quote', $convertible_servers ) ) . ')'; 46 wp_oembed_add_provider( "#https?://$preg_convertible_servers/(conv/.*?/)?blrt/.*#i", "https://$oembed_server/oembed", true ); 47 47 $preg_convertible_short_servers = '(' . implode( '|', array_map( 'preg_quote', $convertible_short_servers ) ) . ')'; 48 wp_oembed_add_provider( "#https?://$preg_convertible_servers/(embed/?/)?(conv/.*?/)?blrt/.*#i", "https://$oembed_server/oembed", true ); 49 wp_oembed_add_provider( "#https?://$preg_convertible_short_servers/.*#i", "https://$oembed_server/oembed", true ); 48 50 return true; 49 51 } … … 55 57 ) ); 56 58 } 59 60 private function get_convertible_short_servers() { 61 return apply_filters( 'blrt_wp_embed_convertible_short_servers' , array( 62 'r.blrt.com' 63 ) ); 64 } 57 65 58 66 private function get_oembed_server() { -
blrt-wp-embed/trunk/readme.txt
r1073085 r1220553 3 3 Tags: Blrt,Embed,oembed 4 4 Requires at least: 2.9 5 Stable tag: 1.0. 06 Tested up to: 4. 15 Stable tag: 1.0.1 6 Tested up to: 4.2 7 7 License: GPL2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.