iframe - Version 1.2.0

Version Description

  • Adding "output=embed" to Google Map;
Download this release

Release Info

Developer webvitaly
Plugin Icon wp plugin iframe
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.0 to 1.2.0

Files changed (2) hide show
  1. iframe.php +8 -3
  2. readme.txt +4 -1
iframe.php CHANGED
@@ -4,13 +4,12 @@
4
  Plugin Name: Iframe
5
  Plugin URI: http://web-profile.com.ua/wordpress/plugins/iframe/
6
  Description: Plugin shows iframe with [iframe width="640" height="480" src="http://player.vimeo.com/video/3261363"] shortcode.
7
- Version: 1.1.0
8
  Author: webvitaly
9
  Author Email: webvitaly(at)gmail.com
10
  Author URI: http://web-profile.com.ua/
11
  */
12
 
13
-
14
  if ( !function_exists( 'iframe_embed_shortcode' ) ) {
15
  function iframe_embed_shortcode($atts, $content = null) {
16
  extract(shortcode_atts(array(
@@ -23,7 +22,13 @@ if ( !function_exists( 'iframe_embed_shortcode' ) ) {
23
  'marginwidth' => '0',
24
  'allowtransparency' => 'true'
25
  ), $atts));
26
- return '<iframe width="'.$width.'" height="'.$height.'" frameborder="'.$frameborder.'" scrolling="'.$scrolling.'" marginheight="'.$marginheight.'" marginwidth="'.$marginwidth.'" allowtransparency="'.$allowtransparency.'" src="'.$src.'"></iframe>';
 
 
 
 
 
 
27
  // &amp;output=embed
28
  }
29
  add_shortcode('iframe', 'iframe_embed_shortcode');
4
  Plugin Name: Iframe
5
  Plugin URI: http://web-profile.com.ua/wordpress/plugins/iframe/
6
  Description: Plugin shows iframe with [iframe width="640" height="480" src="http://player.vimeo.com/video/3261363"] shortcode.
7
+ Version: 1.2.0
8
  Author: webvitaly
9
  Author Email: webvitaly(at)gmail.com
10
  Author URI: http://web-profile.com.ua/
11
  */
12
 
 
13
  if ( !function_exists( 'iframe_embed_shortcode' ) ) {
14
  function iframe_embed_shortcode($atts, $content = null) {
15
  extract(shortcode_atts(array(
22
  'marginwidth' => '0',
23
  'allowtransparency' => 'true'
24
  ), $atts));
25
+ $src_cut = substr($src, 0, 35);
26
+ if(strpos($src_cut, 'maps.google' )){
27
+ $google_map_fix = '&output=embed';
28
+ }else{
29
+ $google_map_fix = '';
30
+ }
31
+ return '<iframe width="'.$width.'" height="'.$height.'" frameborder="'.$frameborder.'" scrolling="'.$scrolling.'" marginheight="'.$marginheight.'" marginwidth="'.$marginwidth.'" allowtransparency="'.$allowtransparency.'" src="'.$src.$google_map_fix.'"></iframe>';
32
  // &amp;output=embed
33
  }
34
  add_shortcode('iframe', 'iframe_embed_shortcode');
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: iframe, embed
5
  Author URI: http://web-profile.com.ua/wordpress/
6
  Requires at least: 3.0
7
  Tested up to: 3.2
8
- Stable tag: 1.1.0
9
 
10
  You can embed iframe with [iframe width="640" height="480" src="http://vimeo.com/123"] shortcode.
11
 
@@ -31,6 +31,9 @@ So you can embed iframe code using this shortcode `[iframe width="640" height="4
31
 
32
  == Changelog ==
33
 
 
 
 
34
  = 1.1.0 =
35
  * Parameter allowtransparency added (thanks to Kent);
36
 
5
  Author URI: http://web-profile.com.ua/wordpress/
6
  Requires at least: 3.0
7
  Tested up to: 3.2
8
+ Stable tag: 1.2.0
9
 
10
  You can embed iframe with [iframe width="640" height="480" src="http://vimeo.com/123"] shortcode.
11
 
31
 
32
  == Changelog ==
33
 
34
+ = 1.2.0 =
35
+ * Adding "output=embed" to Google Map;
36
+
37
  = 1.1.0 =
38
  * Parameter allowtransparency added (thanks to Kent);
39