iframe - Version 1.8

Version Description

  • Added style parameter;
Download this release

Release Info

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

Code changes from version 1.7 to 1.8

Files changed (2) hide show
  1. iframe.php +9 -3
  2. readme.txt +22 -18
iframe.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Iframe
4
  Plugin URI: http://web-profile.com.ua/wordpress/plugins/iframe/
5
  Description: Plugin shows iframe with [iframe src="http://player.vimeo.com/video/3261363" width="100%" height="480"] shortcode.
6
- Version: 1.7
7
  Author: webvitaly
8
  Author Email: webvitaly(at)gmail.com
9
  Author URI: http://web-profile.com.ua/wordpress/
@@ -28,6 +28,7 @@ if ( !function_exists( 'iframe_embed_shortcode' ) ) :
28
  'allowtransparency' => 'true',
29
  'id' => '',
30
  'class' => 'iframe-class',
 
31
  'same_height_as' => ''
32
  ), $atts));
33
  $src_cut = substr($src, 0, 35);
@@ -70,8 +71,13 @@ if ( !function_exists( 'iframe_embed_shortcode' ) ) :
70
  }else{
71
  $id_text = '';
72
  }
73
- $return .= "\n".'<!-- powered by Iframe plugin ver. 1.7 (wordpress.org/extend/plugins/iframe/) -->'."\n";
74
- $return .= '<iframe '.$id_text.'class="'.$class.'" width="'.$width.'" height="'.$height.'" src="'.$src.$google_map_fix.'" frameborder="'.$frameborder.'" scrolling="'.$scrolling.'" marginheight="'.$marginheight.'" marginwidth="'.$marginwidth.'" allowtransparency="'.$allowtransparency.'"></iframe>';
 
 
 
 
 
75
  // &amp;output=embed
76
  return $return;
77
  }
3
  Plugin Name: Iframe
4
  Plugin URI: http://web-profile.com.ua/wordpress/plugins/iframe/
5
  Description: Plugin shows iframe with [iframe src="http://player.vimeo.com/video/3261363" width="100%" height="480"] shortcode.
6
+ Version: 1.8
7
  Author: webvitaly
8
  Author Email: webvitaly(at)gmail.com
9
  Author URI: http://web-profile.com.ua/wordpress/
28
  'allowtransparency' => 'true',
29
  'id' => '',
30
  'class' => 'iframe-class',
31
+ 'style' => '',
32
  'same_height_as' => ''
33
  ), $atts));
34
  $src_cut = substr($src, 0, 35);
71
  }else{
72
  $id_text = '';
73
  }
74
+ if( $style != '' ){
75
+ $style_text = 'style="'.$style.'" ';
76
+ }else{
77
+ $style_text = '';
78
+ }
79
+ $return .= "\n".'<!-- powered by Iframe plugin ver. 1.8 (wordpress.org/extend/plugins/iframe/) -->'."\n";
80
+ $return .= '<iframe '.$id_text.'class="'.$class.'" '.$style_text.'width="'.$width.'" height="'.$height.'" src="'.$src.$google_map_fix.'" frameborder="'.$frameborder.'" scrolling="'.$scrolling.'" marginheight="'.$marginheight.'" marginwidth="'.$marginwidth.'" allowtransparency="'.$allowtransparency.'"></iframe>';
81
  // &amp;output=embed
82
  return $return;
83
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: iframe, embed, youtube, vimeo, google-map, google-maps
5
  Author URI: http://web-profile.com.ua/wordpress/
6
  Requires at least: 3.0
7
  Tested up to: 3.3
8
- Stable tag: 1.7
9
 
10
  You can embed iframe with [iframe src="http://vimeo.com/123" width="100%" height="480"] shortcode.
11
 
@@ -16,17 +16,18 @@ WordPress removes iframe when you switch from "HTML" to "Visual" tab because of
16
  So you can embed iframe code using this shortcode `[iframe src="http://player.vimeo.com/video/3261363" width="100%" height="480"]`.
17
 
18
  = Usage (allowed parameters) =
19
- * width - width of the iframe in pixels `[iframe width="100%" src="http://player.vimeo.com/video/3261363"]` or `[iframe width="640" src="http://player.vimeo.com/video/3261363"]` (by default width="100%");
20
- * height - height of the iframe in pixels `[iframe height="480" src="http://player.vimeo.com/video/3261363"]` (by default height="480");
21
- * src - source of the iframe `[iframe src="http://player.vimeo.com/video/3261363"]` (by default src="");
22
- * frameborder - frameborder parameter of the iframe `[iframe frameborder="0" src="http://player.vimeo.com/video/3261363"]` (by default frameborder="0");
23
- * scrolling - scrolling parameter of the iframe `[iframe scrolling="no" src="http://player.vimeo.com/video/3261363"]` (by default scrolling="no");
24
- * marginheight - marginheight parameter of the iframe `[iframe marginheight="0" src="http://player.vimeo.com/video/3261363"]` (by default marginheight="0");
25
- * marginwidth - marginwidth parameter of the iframe `[iframe marginwidth="0" src="http://player.vimeo.com/video/3261363"]` (by default marginwidth="0");
26
- * allowtransparency - allows to set transparency of the iframe `[iframe allowtransparency="true" src="http://player.vimeo.com/video/3261363"]` (by default allowtransparency="true");
27
- * id - allows to add the id of the iframe `[iframe id="my-id" src="http://player.vimeo.com/video/3261363"]` (by default id="");
28
- * class - allowing to add the class of the iframe `[iframe class="my-class" src="http://player.vimeo.com/video/3261363"]` (by default class="iframe-class");
29
- * same_height_as - allows to set the height of iframe same as target element `[iframe same_height_as="body" src="http://player.vimeo.com/video/3261363"]`, `[iframe same_height_as="div.sidebar"]`, `[iframe same_height_as="div#content"]`, `[iframe same_height_as="window"]` - iframe will have the height of the viewport (visible area), `[iframe same_height_as="document"]` - iframe will have the height of the document, `[iframe same_height_as="content"]` - auto-height feature, so the height of the iframe will be the same as embedded content (works only with the same domain) (by default same_height_as="");
 
30
 
31
  [Iframe plugin page](http://web-profile.com.ua/wordpress/plugins/iframe/)
32
 
@@ -34,24 +35,27 @@ So you can embed iframe code using this shortcode `[iframe src="http://player.vi
34
 
35
  == Changelog ==
36
 
 
 
 
37
  = 1.7 =
38
  * Fixing minor bugs;
39
 
40
  = 1.6.0 =
41
- * Adding auto-height feature (thanks to Willem Veelenturf);
42
 
43
  = 1.5.0 =
44
  * Using native jQuery from include directory;
45
- * Improving "same_height_as" parameter;
46
 
47
  = 1.4.0 =
48
- * Adding "same_height_as" parameter;
49
 
50
  = 1.3.0 =
51
- * Adding "id" and "class" parameters;
52
 
53
  = 1.2.0 =
54
- * Adding "output=embed" fix to Google Map;
55
 
56
  = 1.1.0 =
57
  * Parameter allowtransparency added (thanks to Kent);
@@ -62,4 +66,4 @@ So you can embed iframe code using this shortcode `[iframe src="http://player.vi
62
  == Installation ==
63
 
64
  1. Install plugin and activate it on the Plugins page;
65
- 2. Add shortcode `[iframe width="100%" height="480" src="http://player.vimeo.com/video/3261363"]` to page content;
5
  Author URI: http://web-profile.com.ua/wordpress/
6
  Requires at least: 3.0
7
  Tested up to: 3.3
8
+ Stable tag: 1.8
9
 
10
  You can embed iframe with [iframe src="http://vimeo.com/123" width="100%" height="480"] shortcode.
11
 
16
  So you can embed iframe code using this shortcode `[iframe src="http://player.vimeo.com/video/3261363" width="100%" height="480"]`.
17
 
18
  = Usage (allowed parameters) =
19
+ * **width** - width in pixels or in percents `[iframe width="100%" src="http://player.vimeo.com/video/3261363"]` or `[iframe width="640" src="http://player.vimeo.com/video/3261363"]` (by default width="100%");
20
+ * **height** - height in pixels `[iframe height="480" src="http://player.vimeo.com/video/3261363"]` (by default height="480");
21
+ * **src** - source of the iframe `[iframe src="http://player.vimeo.com/video/3261363"]` (by default src="");
22
+ * **frameborder** - parameter of the iframe `[iframe frameborder="0" src="http://player.vimeo.com/video/3261363"]` (by default frameborder="0");
23
+ * **scrolling** - parameter of the iframe `[iframe scrolling="no" src="http://player.vimeo.com/video/3261363"]` (by default scrolling="no");
24
+ * **marginheight** - parameter of the iframe `[iframe marginheight="0" src="http://player.vimeo.com/video/3261363"]` (by default marginheight="0");
25
+ * **marginwidth** - parameter of the iframe `[iframe marginwidth="0" src="http://player.vimeo.com/video/3261363"]` (by default marginwidth="0");
26
+ * **allowtransparency** - allows to set transparency of the iframe `[iframe allowtransparency="true" src="http://player.vimeo.com/video/3261363"]` (by default allowtransparency="true");
27
+ * **id** - allows to add the id of the iframe `[iframe id="my-id" src="http://player.vimeo.com/video/3261363"]` (by default id="");
28
+ * **class** - allows to add the class of the iframe `[iframe class="my-class" src="http://player.vimeo.com/video/3261363"]` (by default class="iframe-class");
29
+ * **style** - allows to add the css styles of the iframe `[iframe style="margin-left:-30px;" src="http://player.vimeo.com/video/3261363"]` (by default style="");
30
+ * **same_height_as** - allows to set the height of iframe same as target element `[iframe same_height_as="body" src="http://player.vimeo.com/video/3261363"]`, `[iframe same_height_as="div.sidebar"]`, `[iframe same_height_as="div#content"]`, `[iframe same_height_as="window"]` - iframe will have the height of the viewport (visible area), `[iframe same_height_as="document"]` - iframe will have the height of the parent document (not the height of the embedded document), `[iframe same_height_as="content"]` - auto-height feature, so the height of the iframe will be the same as embedded content (works only with the same domain) (by default same_height_as="");
31
 
32
  [Iframe plugin page](http://web-profile.com.ua/wordpress/plugins/iframe/)
33
 
35
 
36
  == Changelog ==
37
 
38
+ = 1.8 =
39
+ * Added style parameter;
40
+
41
  = 1.7 =
42
  * Fixing minor bugs;
43
 
44
  = 1.6.0 =
45
+ * Added auto-height feature (thanks to Willem Veelenturf);
46
 
47
  = 1.5.0 =
48
  * Using native jQuery from include directory;
49
+ * Improved "same_height_as" parameter;
50
 
51
  = 1.4.0 =
52
+ * Added "same_height_as" parameter;
53
 
54
  = 1.3.0 =
55
+ * Added "id" and "class" parameters;
56
 
57
  = 1.2.0 =
58
+ * Added "output=embed" fix to Google Map;
59
 
60
  = 1.1.0 =
61
  * Parameter allowtransparency added (thanks to Kent);
66
  == Installation ==
67
 
68
  1. Install plugin and activate it on the Plugins page;
69
+ 2. Add shortcode `[iframe src="http://player.vimeo.com/video/3261363" width="100%" height="480"]` to page content;