Version Description
- Parameter allowtransparency added (thanks to Kent);
Download this release
Release Info
Developer | webvitaly |
Plugin | iframe |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.1.0
- iframe.php +7 -6
- readme.txt +43 -40
iframe.php
CHANGED
@@ -4,15 +4,15 @@
|
|
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.
|
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( '
|
15 |
-
function
|
16 |
extract(shortcode_atts(array(
|
17 |
'width' => '640',
|
18 |
'height' => '480',
|
@@ -20,10 +20,11 @@ if ( !function_exists( 'iframe_embed_sortcode' ) ) {
|
|
20 |
'frameborder' => '0',
|
21 |
'scrolling' => 'no',
|
22 |
'marginheight' => '0',
|
23 |
-
'marginwidth' => '0'
|
|
|
24 |
), $atts));
|
25 |
-
return '<iframe width="'.$width.'" height="'.$height.'" frameborder="'.$frameborder.'" scrolling="'.$scrolling.'" marginheight="'.$marginheight.'" marginwidth="'.$marginwidth.'" src="'.$src.'"
|
26 |
// &output=embed
|
27 |
}
|
28 |
-
add_shortcode('iframe', '
|
29 |
}
|
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(
|
17 |
'width' => '640',
|
18 |
'height' => '480',
|
20 |
'frameborder' => '0',
|
21 |
'scrolling' => 'no',
|
22 |
'marginheight' => '0',
|
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 |
// &output=embed
|
28 |
}
|
29 |
+
add_shortcode('iframe', 'iframe_embed_shortcode');
|
30 |
}
|
readme.txt
CHANGED
@@ -1,40 +1,43 @@
|
|
1 |
-
=== Iframe ===
|
2 |
-
Contributors: webvitaly
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
=
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
*
|
25 |
-
*
|
26 |
-
*
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
1 |
+
=== Iframe ===
|
2 |
+
Contributors: webvitaly
|
3 |
+
Plugin URI: http://web-profile.com.ua/wordpress/plugins/iframe/
|
4 |
+
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 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
Iframes are needed to embed video from youtube or to embed Google Map or just to embed content from external page.
|
15 |
+
WordPress removes iframe when you switch from "HTML" to "Visual" tab because of the security reasons.
|
16 |
+
So you can embed iframe code using this shortcode `[iframe width="640" height="480" src="http://player.vimeo.com/video/3261363"]`.
|
17 |
+
|
18 |
+
= Usage (allowed parameters) =
|
19 |
+
* width - width of the iframe in pixels `[iframe width="640" src="http://player.vimeo.com/video/3261363"]` (by default width="640");
|
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 - allowing transparency of the iframe `[iframe allowtransparency="true" src="http://player.vimeo.com/video/3261363"]` (by default allowtransparency="true");
|
27 |
+
|
28 |
+
[Iframe plugin page](http://web-profile.com.ua/wordpress/plugins/iframe/)
|
29 |
+
|
30 |
+
[WordPress stuff](http://web-profile.com.ua/wordpress/)
|
31 |
+
|
32 |
+
== Changelog ==
|
33 |
+
|
34 |
+
= 1.1.0 =
|
35 |
+
* Parameter allowtransparency added (thanks to Kent);
|
36 |
+
|
37 |
+
= 1.0.0 =
|
38 |
+
* Initial release;
|
39 |
+
|
40 |
+
== Installation ==
|
41 |
+
|
42 |
+
1. Install plugin and activate it on the Plugins page;
|
43 |
+
2. Add shortcode `[iframe width="640" height="480" src="http://player.vimeo.com/video/3261363"]` to page content;
|