Version Description
- 2014-03-14 =
- remove fix for google maps
Download this release
Release Info
Developer | webvitaly |
Plugin | iframe |
Version | 2.8 |
Comparing to | |
See all releases |
Code changes from version 2.7 to 2.8
- iframe.php +7 -12
- readme.txt +8 -5
iframe.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
Plugin Name: iframe
|
4 |
Plugin URI: http://wordpress.org/plugins/iframe/
|
5 |
Description: [iframe src="http://www.youtube.com/embed/A3PDXmYoF5U" width="100%" height="480"] shortcode
|
6 |
-
Version: 2.
|
7 |
Author: webvitaly
|
8 |
Author URI: http://web-profile.com.ua/wordpress/plugins/
|
9 |
-
License:
|
10 |
*/
|
11 |
|
12 |
|
@@ -17,6 +17,7 @@ if ( ! function_exists( 'iframe_unqprfx_embed_shortcode' ) ) :
|
|
17 |
}
|
18 |
add_action( 'wp_enqueue_scripts', 'iframe_unqprfx_enqueue_script' );
|
19 |
|
|
|
20 |
function iframe_unqprfx_embed_shortcode( $atts, $content = null ) {
|
21 |
$defaults = array(
|
22 |
'src' => 'http://www.youtube.com/embed/A3PDXmYoF5U',
|
@@ -33,11 +34,6 @@ if ( ! function_exists( 'iframe_unqprfx_embed_shortcode' ) ) :
|
|
33 |
}
|
34 |
}
|
35 |
|
36 |
-
$src_cut = substr( $atts["src"], 0, 35 ); // special case for google maps
|
37 |
-
if( strpos( $src_cut, 'maps.google' ) ){
|
38 |
-
$atts["src"] .= '&output=embed';
|
39 |
-
}
|
40 |
-
|
41 |
// get_params_from_url
|
42 |
if( isset( $atts["get_params_from_url"] ) && ( $atts["get_params_from_url"] == '1' || $atts["get_params_from_url"] == 1 || $atts["get_params_from_url"] == 'true' ) ) {
|
43 |
if( $_GET != NULL ){
|
@@ -73,7 +69,6 @@ if ( ! function_exists( 'iframe_unqprfx_embed_shortcode' ) ) :
|
|
73 |
jQuery(function($){
|
74 |
var target_height = $(' . $target_selector . ').height();
|
75 |
$("iframe.' . $atts["class"] . '").height(target_height);
|
76 |
-
//alert(target_height);
|
77 |
});
|
78 |
</script>
|
79 |
';
|
@@ -90,7 +85,7 @@ if ( ! function_exists( 'iframe_unqprfx_embed_shortcode' ) ) :
|
|
90 |
';
|
91 |
}
|
92 |
}
|
93 |
-
$html .= "\n".'<!-- iframe plugin v.2.
|
94 |
$html .= '<iframe';
|
95 |
foreach( $atts as $attr => $value ) {
|
96 |
if( $attr != 'same_height_as' ){ // remove some attributes
|
@@ -101,7 +96,7 @@ if ( ! function_exists( 'iframe_unqprfx_embed_shortcode' ) ) :
|
|
101 |
}
|
102 |
}
|
103 |
}
|
104 |
-
$html .= '></iframe>';
|
105 |
return $html;
|
106 |
}
|
107 |
add_shortcode( 'iframe', 'iframe_unqprfx_embed_shortcode' );
|
@@ -109,8 +104,8 @@ if ( ! function_exists( 'iframe_unqprfx_embed_shortcode' ) ) :
|
|
109 |
|
110 |
function iframe_unqprfx_plugin_meta( $links, $file ) { // add 'Plugin page' and 'Donate' links to plugin meta row
|
111 |
if ( strpos( $file, 'iframe.php' ) !== false ) {
|
112 |
-
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/wordpress/plugins/iframe/" title="Plugin page">
|
113 |
-
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/donate/" title="Support the development">
|
114 |
}
|
115 |
return $links;
|
116 |
}
|
3 |
Plugin Name: iframe
|
4 |
Plugin URI: http://wordpress.org/plugins/iframe/
|
5 |
Description: [iframe src="http://www.youtube.com/embed/A3PDXmYoF5U" width="100%" height="480"] shortcode
|
6 |
+
Version: 2.8
|
7 |
Author: webvitaly
|
8 |
Author URI: http://web-profile.com.ua/wordpress/plugins/
|
9 |
+
License: GPLv3
|
10 |
*/
|
11 |
|
12 |
|
17 |
}
|
18 |
add_action( 'wp_enqueue_scripts', 'iframe_unqprfx_enqueue_script' );
|
19 |
|
20 |
+
|
21 |
function iframe_unqprfx_embed_shortcode( $atts, $content = null ) {
|
22 |
$defaults = array(
|
23 |
'src' => 'http://www.youtube.com/embed/A3PDXmYoF5U',
|
34 |
}
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
37 |
// get_params_from_url
|
38 |
if( isset( $atts["get_params_from_url"] ) && ( $atts["get_params_from_url"] == '1' || $atts["get_params_from_url"] == 1 || $atts["get_params_from_url"] == 'true' ) ) {
|
39 |
if( $_GET != NULL ){
|
69 |
jQuery(function($){
|
70 |
var target_height = $(' . $target_selector . ').height();
|
71 |
$("iframe.' . $atts["class"] . '").height(target_height);
|
|
|
72 |
});
|
73 |
</script>
|
74 |
';
|
85 |
';
|
86 |
}
|
87 |
}
|
88 |
+
$html .= "\n".'<!-- iframe plugin v.2.8 wordpress.org/plugins/iframe/ -->'."\n";
|
89 |
$html .= '<iframe';
|
90 |
foreach( $atts as $attr => $value ) {
|
91 |
if( $attr != 'same_height_as' ){ // remove some attributes
|
96 |
}
|
97 |
}
|
98 |
}
|
99 |
+
$html .= '></iframe>'."\n";
|
100 |
return $html;
|
101 |
}
|
102 |
add_shortcode( 'iframe', 'iframe_unqprfx_embed_shortcode' );
|
104 |
|
105 |
function iframe_unqprfx_plugin_meta( $links, $file ) { // add 'Plugin page' and 'Donate' links to plugin meta row
|
106 |
if ( strpos( $file, 'iframe.php' ) !== false ) {
|
107 |
+
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/wordpress/plugins/iframe/" title="Plugin page">Iframe</a>' ) );
|
108 |
+
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/donate/" title="Support the development">Donate</a>' ) );
|
109 |
}
|
110 |
return $links;
|
111 |
}
|
readme.txt
CHANGED
@@ -3,10 +3,10 @@ Contributors: webvitaly
|
|
3 |
Donate link: http://web-profile.com.ua/donate/
|
4 |
Tags: iframe, embed, youtube, vimeo, google-map, google-maps
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.
|
8 |
-
License:
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl
|
10 |
|
11 |
[iframe src="http://www.youtube.com/embed/A3PDXmYoF5U" width="100%" height="480"] shortcode
|
12 |
|
@@ -31,7 +31,7 @@ If you need to embed content from YouTube, Vimeo, SlideShare, SoundCloud, Twitte
|
|
31 |
= Useful: =
|
32 |
* ["Anti-spam" - block spam in comments](http://wordpress.org/plugins/anti-spam/ "no spam, no captcha")
|
33 |
* ["Page-list" - show list of pages with shortcodes](http://wordpress.org/plugins/page-list/ "list of pages with shortcodes")
|
34 |
-
* ["
|
35 |
|
36 |
== Other Notes ==
|
37 |
|
@@ -58,6 +58,9 @@ If you need to embed content from YouTube, Vimeo, SlideShare, SoundCloud, Twitte
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
61 |
= 2.7 - 2013-06-09 =
|
62 |
* minor changes
|
63 |
|
3 |
Donate link: http://web-profile.com.ua/donate/
|
4 |
Tags: iframe, embed, youtube, vimeo, google-map, google-maps
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.9
|
7 |
+
Stable tag: 2.8
|
8 |
+
License: GPLv3
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
|
11 |
[iframe src="http://www.youtube.com/embed/A3PDXmYoF5U" width="100%" height="480"] shortcode
|
12 |
|
31 |
= Useful: =
|
32 |
* ["Anti-spam" - block spam in comments](http://wordpress.org/plugins/anti-spam/ "no spam, no captcha")
|
33 |
* ["Page-list" - show list of pages with shortcodes](http://wordpress.org/plugins/page-list/ "list of pages with shortcodes")
|
34 |
+
* ["Security-protection" - blocks brute-force attacks](http://wordpress.org/plugins/security-protection/ "stops brute-force attacks")
|
35 |
|
36 |
== Other Notes ==
|
37 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 2.8 - 2014-03-14 =
|
62 |
+
* remove fix for google maps
|
63 |
+
|
64 |
= 2.7 - 2013-06-09 =
|
65 |
* minor changes
|
66 |
|