Version Description
- Added style parameter;
Download this release
Release Info
Developer | webvitaly |
Plugin | iframe |
Version | 1.8 |
Comparing to | |
See all releases |
Code changes from version 1.7 to 1.8
- iframe.php +9 -3
- 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 |
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 |
-
$
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
75 |
// &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 |
// &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.
|
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
|
20 |
-
* height - height
|
21 |
-
* src - source of the iframe `[iframe src="http://player.vimeo.com/video/3261363"]` (by default src="");
|
22 |
-
* frameborder -
|
23 |
-
* scrolling -
|
24 |
-
* marginheight -
|
25 |
-
* marginwidth -
|
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 -
|
29 |
-
*
|
|
|
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 |
-
*
|
42 |
|
43 |
= 1.5.0 =
|
44 |
* Using native jQuery from include directory;
|
45 |
-
*
|
46 |
|
47 |
= 1.4.0 =
|
48 |
-
*
|
49 |
|
50 |
= 1.3.0 =
|
51 |
-
*
|
52 |
|
53 |
= 1.2.0 =
|
54 |
-
*
|
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
|
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;
|