iframe - Version 1.0.0

Version Description

  • Initial release;

=

Download this release

Release Info

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

Version 1.0.0

Files changed (2) hide show
  1. iframe.php +29 -0
  2. readme.txt +40 -0
iframe.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
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.0.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_sortcode' ) ) {
15
+ function iframe_embed_sortcode($atts, $content = null) {
16
+ extract(shortcode_atts(array(
17
+ 'width' => '640',
18
+ 'height' => '480',
19
+ 'src' => '',
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.'" ></iframe>';
26
+ // &amp;output=embed
27
+ }
28
+ add_shortcode('iframe', 'iframe_embed_sortcode');
29
+ }
readme.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Iframe ===
2
+ Contributors: webvitaly
3
+ Donate link: http://web-profile.com.ua/wordpress/plugins/iframe/
4
+ Plugin URI: http://web-profile.com.ua/wordpress/plugins/iframe/
5
+ Tags: iframe, embed
6
+ Author URI: http://web-profile.com.ua/wordpress/
7
+ Requires at least: 3.0
8
+ Tested up to: 3.1.1
9
+ Stable tag: 1.0.0
10
+
11
+ You may embed iframe with [iframe width="640" height="480" src="http://vimeo.com/123"] shortcode.
12
+
13
+ == Description ==
14
+
15
+ Iframes are needed to embed video from youtube or to embed Google Map or just to embed content from external page.
16
+ WordPress removes iframe when you switch from "HTML" to "Visual" tab because of the security reasons.
17
+ So you can embed iframe code using this shortcode **`[iframe width="640" height="480" src="http://player.vimeo.com/video/3261363"]`**.
18
+
19
+ = Usage =
20
+ * You can set various parameters:
21
+ * width - width of the iframe in pixels `[iframe width="640" src="http://player.vimeo.com/video/3261363"]` (by default width="640");
22
+ * height - height of the iframe in pixels `[iframe height="480" src="http://player.vimeo.com/video/3261363"]` (by default height="480");
23
+ * src - source of the iframe `[iframe src="http://player.vimeo.com/video/3261363"]` (by default src="");
24
+ * frameborder - frameborder parameter of the iframe `[iframe frameborder="0" src="http://player.vimeo.com/video/3261363"]` (by default frameborder="0");
25
+ * scrolling - scrolling parameter of the iframe `[iframe scrolling="no" src="http://player.vimeo.com/video/3261363"]` (by default scrolling="no");
26
+ * marginheight - marginheight parameter of the iframe `[iframe marginheight="0" src="http://player.vimeo.com/video/3261363"]` (by default marginheight="0");
27
+ * marginwidth - marginwidth parameter of the iframe `[iframe marginwidth="0" src="http://player.vimeo.com/video/3261363"]` (by default marginwidth="0");
28
+
29
+ [WordPress stuff](http://web-profile.com.ua/wordpress/)
30
+
31
+ == Changelog ==
32
+
33
+ = 1.0.0 =
34
+ * Initial release;
35
+
36
+ == Installation ==
37
+
38
+ 1. Install plugin and activate it on the Plugins page;
39
+ 2. Add shortcode **`[iframe width="640" height="480" src="http://player.vimeo.com/video/3261363"]`** to page content;
40
+