Version Description
- Bug fix release
Download this release
Release Info
Developer | freediver |
Plugin | Smart YouTube PRO |
Version | 4.0.2 |
Comparing to | |
See all releases |
Code changes from version 4.0 to 4.0.2
- readme.txt +3 -0
- smartyoutube.php +14 -11
readme.txt
CHANGED
@@ -40,6 +40,9 @@ Plugin by Vladimir Prelovac. Also check out <a href="http://managewp.com">Manage
|
|
40 |
|
41 |
== Changelog ==
|
42 |
|
|
|
|
|
|
|
43 |
= 4.0 =
|
44 |
* Major release
|
45 |
* Added support for Vimeo, Metacafe, Liveleak and Facebook videos
|
40 |
|
41 |
== Changelog ==
|
42 |
|
43 |
+
= 4.0.2 =
|
44 |
+
* Bug fix release
|
45 |
+
|
46 |
= 4.0 =
|
47 |
* Major release
|
48 |
* Added support for Vimeo, Metacafe, Liveleak and Facebook videos
|
smartyoutube.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Smart Youtube PRO
|
|
4 |
Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/smart-youtube
|
5 |
Description: Insert YouTube videos in posts, comments and RSS feeds with ease and full customization.
|
6 |
Author: Vladimir Prelovac
|
7 |
-
Version: 4.0
|
8 |
Author URI: http://www.prelovac.com/vladimir/
|
9 |
|
10 |
|
@@ -105,8 +105,8 @@ class SmartYouTube_PRO {
|
|
105 |
|
106 |
function add_filters_and_hooks() {
|
107 |
if ( $this->options['posts'] == 'on' ) {
|
108 |
-
add_filter( 'the_content', array( $this, 'check' ),
|
109 |
-
add_filter( 'the_excerpt', array( $this, 'check_excerpt' ),
|
110 |
}
|
111 |
|
112 |
if ( $this->options['comments'] == 'on' ) {
|
@@ -568,6 +568,7 @@ class SmartYouTube_PRO {
|
|
568 |
$imgpath = $this->plugin_url . '/i';
|
569 |
$actionurl = $_SERVER['REQUEST_URI'];
|
570 |
|
|
|
571 |
?>
|
572 |
<div class="wrap">
|
573 |
<?php screen_icon(); ?>
|
@@ -588,7 +589,7 @@ class SmartYouTube_PRO {
|
|
588 |
<label for="colorbox_theme"><?php _e( 'Choose ColorBox theme:', 'smart-youtube' ); ?></label>
|
589 |
<select id="colorbox_theme" name="colorbox_theme">
|
590 |
<?php for($i = 1; $i <= 11; $i++): ?>
|
591 |
-
<option value="<?php echo $i; ?>" <?php echo ($this->options['colorbox']['theme']
|
592 |
<?php endfor; ?>
|
593 |
</select>
|
594 |
</div>
|
@@ -679,7 +680,7 @@ class SmartYouTube_PRO {
|
|
679 |
$replace_text = '';
|
680 |
$replace_text = apply_filters( 'wiziapp_3rd_party_plugin', $replace_text, 'video', $videos );
|
681 |
$the_content = str_replace( $match[1], $replace_text, $the_content );
|
682 |
-
} else if (
|
683 |
$the_content = str_replace( $match[1], $this->tag_youtube( $context, $match[6], 'v', $match[7] ), $the_content );
|
684 |
} else if ( $match[3] == 'v' || $match[3] == 'vh' || $match[3] == 'vhd' ) {
|
685 |
$the_content = str_replace( $match[1], $this->tag_youtube( $context, $match[6], $match[3], $match[7] ), $the_content );
|
@@ -692,7 +693,7 @@ class SmartYouTube_PRO {
|
|
692 |
$replace_text = '';
|
693 |
$replace_text = apply_filters( 'wiziapp_3rd_party_plugin', $replace_text, 'video', $videos );
|
694 |
$the_content = str_replace( $match[1], $replace_text, $the_content );
|
695 |
-
} else if (
|
696 |
$the_content = str_replace( $match[8], $this->tag_youtube( $context, $match[12], 'v' ), $the_content );
|
697 |
} else if ( $match[10] == 'v' || $match[10] == 'vh' || $match[10] == 'vhd' ) {
|
698 |
$the_content = str_replace( $match[8], $this->tag_youtube( $context, $match[12], $match[10] ), $the_content );
|
@@ -901,7 +902,7 @@ class SmartYouTube_PRO {
|
|
901 |
}
|
902 |
$result = $matches['facebook.com'][0][0];
|
903 |
} else {
|
904 |
-
|
905 |
$height = $this->options['heightside'];
|
906 |
|
907 |
$img_url = htmlspecialchars( $this->plugin_url . '/img/default.jpg' );
|
@@ -911,7 +912,9 @@ class SmartYouTube_PRO {
|
|
911 |
<img src="$img_url" height="$height" width="$width" />
|
912 |
</a>
|
913 |
EOT;
|
914 |
-
$result = str_replace( '{video}', $yte_tag, html_entity_decode( $template ) )
|
|
|
|
|
915 |
}
|
916 |
if ( isset( $result ) ) {
|
917 |
$the_content = '<div style="float:' . $this->options["excerpt_thumb"] . ';padding-' . ( $this->options["excerpt_thumb"] == 'left' ? 'right' : 'left' ) . ':10px;">' . $result . '</div>' . $the_content . '<div style="clear:both"></div>';
|
@@ -1429,8 +1432,8 @@ EOT;
|
|
1429 |
'height' => 344,
|
1430 |
'widthhq' => 480,
|
1431 |
'heighthq' => 295,
|
1432 |
-
'widthside' =>
|
1433 |
-
'heightside' =>
|
1434 |
'rel' => 1,
|
1435 |
'link' => 'on',
|
1436 |
'valid' => 'off',
|
@@ -1451,7 +1454,7 @@ EOT;
|
|
1451 |
'thumb' => 'off',
|
1452 |
'colorbox' => 'off',
|
1453 |
'colorbox_theme' => 1,
|
1454 |
-
'excerpt' => '
|
1455 |
'excerpt_thumb' => 'left',
|
1456 |
'logoless' => 'on',
|
1457 |
'wiziapp' => 'off',
|
4 |
Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/smart-youtube
|
5 |
Description: Insert YouTube videos in posts, comments and RSS feeds with ease and full customization.
|
6 |
Author: Vladimir Prelovac
|
7 |
+
Version: 4.0.2
|
8 |
Author URI: http://www.prelovac.com/vladimir/
|
9 |
|
10 |
|
105 |
|
106 |
function add_filters_and_hooks() {
|
107 |
if ( $this->options['posts'] == 'on' ) {
|
108 |
+
add_filter( 'the_content', array( $this, 'check' ), 5 );
|
109 |
+
add_filter( 'the_excerpt', array( $this, 'check_excerpt' ), 5 );
|
110 |
}
|
111 |
|
112 |
if ( $this->options['comments'] == 'on' ) {
|
568 |
$imgpath = $this->plugin_url . '/i';
|
569 |
$actionurl = $_SERVER['REQUEST_URI'];
|
570 |
|
571 |
+
$this->options = $this->get_options();
|
572 |
?>
|
573 |
<div class="wrap">
|
574 |
<?php screen_icon(); ?>
|
589 |
<label for="colorbox_theme"><?php _e( 'Choose ColorBox theme:', 'smart-youtube' ); ?></label>
|
590 |
<select id="colorbox_theme" name="colorbox_theme">
|
591 |
<?php for($i = 1; $i <= 11; $i++): ?>
|
592 |
+
<option value="<?php echo $i; ?>" <?php echo ( $this->options['colorbox']['theme'] == $i ) ? 'selected="yes"' : ''; ?>><?php echo __( 'Theme ', 'smart-youtube' ) . $i; ?></option>
|
593 |
<?php endfor; ?>
|
594 |
</select>
|
595 |
</div>
|
680 |
$replace_text = '';
|
681 |
$replace_text = apply_filters( 'wiziapp_3rd_party_plugin', $replace_text, 'video', $videos );
|
682 |
$the_content = str_replace( $match[1], $replace_text, $the_content );
|
683 |
+
} else if ( ( $match[2] == 'http://' && $this->options['http'] == 'on' ) || ( $match[2] == '' && $this->options['www'] == 'on' ) ) {
|
684 |
$the_content = str_replace( $match[1], $this->tag_youtube( $context, $match[6], 'v', $match[7] ), $the_content );
|
685 |
} else if ( $match[3] == 'v' || $match[3] == 'vh' || $match[3] == 'vhd' ) {
|
686 |
$the_content = str_replace( $match[1], $this->tag_youtube( $context, $match[6], $match[3], $match[7] ), $the_content );
|
693 |
$replace_text = '';
|
694 |
$replace_text = apply_filters( 'wiziapp_3rd_party_plugin', $replace_text, 'video', $videos );
|
695 |
$the_content = str_replace( $match[1], $replace_text, $the_content );
|
696 |
+
} else if ( ( $match[9] == 'http://' && $this->options['http'] == 'on' ) || ( $match[9] == '' && $this->options['www'] == 'on' ) ) {
|
697 |
$the_content = str_replace( $match[8], $this->tag_youtube( $context, $match[12], 'v' ), $the_content );
|
698 |
} else if ( $match[10] == 'v' || $match[10] == 'vh' || $match[10] == 'vhd' ) {
|
699 |
$the_content = str_replace( $match[8], $this->tag_youtube( $context, $match[12], $match[10] ), $the_content );
|
902 |
}
|
903 |
$result = $matches['facebook.com'][0][0];
|
904 |
} else {
|
905 |
+
/*$width = $this->options['widthside'];
|
906 |
$height = $this->options['heightside'];
|
907 |
|
908 |
$img_url = htmlspecialchars( $this->plugin_url . '/img/default.jpg' );
|
912 |
<img src="$img_url" height="$height" width="$width" />
|
913 |
</a>
|
914 |
EOT;
|
915 |
+
$result = str_replace( '{video}', $yte_tag, html_entity_decode( $template ) );*/
|
916 |
+
|
917 |
+
return $the_content;
|
918 |
}
|
919 |
if ( isset( $result ) ) {
|
920 |
$the_content = '<div style="float:' . $this->options["excerpt_thumb"] . ';padding-' . ( $this->options["excerpt_thumb"] == 'left' ? 'right' : 'left' ) . ':10px;">' . $result . '</div>' . $the_content . '<div style="clear:both"></div>';
|
1432 |
'height' => 344,
|
1433 |
'widthhq' => 480,
|
1434 |
'heighthq' => 295,
|
1435 |
+
'widthside' => 200,
|
1436 |
+
'heightside' => 167,
|
1437 |
'rel' => 1,
|
1438 |
'link' => 'on',
|
1439 |
'valid' => 'off',
|
1454 |
'thumb' => 'off',
|
1455 |
'colorbox' => 'off',
|
1456 |
'colorbox_theme' => 1,
|
1457 |
+
'excerpt' => 'not',
|
1458 |
'excerpt_thumb' => 'left',
|
1459 |
'logoless' => 'on',
|
1460 |
'wiziapp' => 'off',
|