Featured Video Plus - Version 2.3.1

Version Description

Download this release

Release Info

Developer a.hoereth
Plugin Icon 128x128 Featured Video Plus
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3.0 to 2.3.1

Files changed (4) hide show
  1. CHANGELOG.md +3 -0
  2. featured-video-plus.php +2 -2
  3. php/class-backend.php +5 -11
  4. readme.txt +4 -1
CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
  # Changelog #
2
 
 
 
 
3
  ## 2.3.0: 2016-12-15 ##
4
  * Now compatible with [Video SEO](https://yoast.com/wordpress/plugins/video-seo/)! ([*](https://wordpress.org/support/topic/compatibility-with-video-seo), [*](https://wordpress.org/support/topic/video-seo-featured-video-plus-compatability), [*](https://wordpress.org/support/topic/fantastic-a-must-have-for-all-video-sites))
5
  * Fix AJAX vulnerability reported by [@jamesgol](https://github.com/jamesgol).
1
  # Changelog #
2
 
3
+ ## 2.3.1: 2016-12-16 ##
4
+ * Quick fix 'are you sure' error on post creation. ([*](https://wordpress.org/support/topic/latest-update-causing-error/), [*](https://wordpress.org/support/topic/error-are-you-sure-you-want-to-do-this-3/))
5
+
6
  ## 2.3.0: 2016-12-15 ##
7
  * Now compatible with [Video SEO](https://yoast.com/wordpress/plugins/video-seo/)! ([*](https://wordpress.org/support/topic/compatibility-with-video-seo), [*](https://wordpress.org/support/topic/video-seo-featured-video-plus-compatability), [*](https://wordpress.org/support/topic/fantastic-a-must-have-for-all-video-sites))
8
  * Fix AJAX vulnerability reported by [@jamesgol](https://github.com/jamesgol).
featured-video-plus.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Featured Video Plus
4
  Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/
5
  Description: Add Featured Videos to your posts and pages.
6
- Version: 2.3.0
7
  Author: Alexander Höreth
8
  Author URI: http://yrnxt.com
9
  Text Domain: featured-video-plus
@@ -32,7 +32,7 @@ License: GPL-2.0
32
  // ********************
33
  // CONSTANTS
34
  if ( ! defined( 'FVP_VERSION' ) ) {
35
- define( 'FVP_VERSION', '2.3.0' );
36
  }
37
 
38
  $pathinfo = pathinfo( dirname( plugin_basename( __FILE__ ) ) );
3
  Plugin Name: Featured Video Plus
4
  Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/
5
  Description: Add Featured Videos to your posts and pages.
6
+ Version: 2.3.1
7
  Author: Alexander Höreth
8
  Author URI: http://yrnxt.com
9
  Text Domain: featured-video-plus
32
  // ********************
33
  // CONSTANTS
34
  if ( ! defined( 'FVP_VERSION' ) ) {
35
+ define( 'FVP_VERSION', '2.3.1' );
36
  }
37
 
38
  $pathinfo = pathinfo( dirname( plugin_basename( __FILE__ ) ) );
php/class-backend.php CHANGED
@@ -239,12 +239,11 @@ class FVP_Backend extends Featured_Video_Plus {
239
  * @param {int} $post_id
240
  */
241
  public function metabox_save( $post_id ) {
242
- self::verify_nonce( $post_id );
243
-
244
  if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ||
245
- ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ||
246
- ( ! current_user_can( 'edit_post', $post_id ) ) ||
247
- ( false !== wp_is_post_revision( $post_id ) )
 
248
  ) {
249
  return;
250
  }
@@ -761,18 +760,13 @@ class FVP_Backend extends Featured_Video_Plus {
761
  * @param bool $bool whether to return a boolean or strictly exit
762
  * @return bool/none Return bool if $bool is set to true
763
  */
764
- private static function verify_nonce( $identifier, $bool = false ) {
765
  $action = self::get_nonce_action( $identifier );
766
 
767
  if (
768
  ! isset( $_REQUEST[ 'fvp_nonce' ] ) ||
769
  ! wp_verify_nonce( $_REQUEST[ 'fvp_nonce' ], $action )
770
  ) {
771
- if ( ! $bool ) {
772
- wp_nonce_ays( $action );
773
- exit;
774
- }
775
-
776
  return false;
777
  }
778
 
239
  * @param {int} $post_id
240
  */
241
  public function metabox_save( $post_id ) {
 
 
242
  if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ||
243
+ ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ||
244
+ ( ! current_user_can( 'edit_post', $post_id ) ) ||
245
+ ( false !== wp_is_post_revision( $post_id ) ) ||
246
+ ( ! self::verify_nonce( $post_id ) )
247
  ) {
248
  return;
249
  }
760
  * @param bool $bool whether to return a boolean or strictly exit
761
  * @return bool/none Return bool if $bool is set to true
762
  */
763
+ private static function verify_nonce( $identifier ) {
764
  $action = self::get_nonce_action( $identifier );
765
 
766
  if (
767
  ! isset( $_REQUEST[ 'fvp_nonce' ] ) ||
768
  ! wp_verify_nonce( $_REQUEST[ 'fvp_nonce' ], $action )
769
  ) {
 
 
 
 
 
770
  return false;
771
  }
772
 
readme.txt CHANGED
@@ -10,7 +10,7 @@ License: GPL-2.0
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Requires at least: 3.7
12
  Tested up to: 4.7
13
- Stable tag: 2.3.0
14
 
15
  Add Featured Videos to your posts and pages. Works like magic with most themes which use Featured Images. Local Media, YouTube, Vimeo and many more.
16
 
@@ -112,6 +112,9 @@ Yes, please! Check out the official [Featured Video Plus Translation Project](ht
112
 
113
  == Changelog ==
114
 
 
 
 
115
  = 2.3.0: 2016-12-15 =
116
  * Now compatible with [Video SEO](https://yoast.com/wordpress/plugins/video-seo/)! ([*](https://wordpress.org/support/topic/compatibility-with-video-seo), [*](https://wordpress.org/support/topic/video-seo-featured-video-plus-compatability), [*](https://wordpress.org/support/topic/fantastic-a-must-have-for-all-video-sites))
117
  * Fix AJAX vulnerability reported by [@jamesgol](https://github.com/jamesgol).
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Requires at least: 3.7
12
  Tested up to: 4.7
13
+ Stable tag: 2.3.1
14
 
15
  Add Featured Videos to your posts and pages. Works like magic with most themes which use Featured Images. Local Media, YouTube, Vimeo and many more.
16
 
112
 
113
  == Changelog ==
114
 
115
+ = 2.3.1: 2016-12-16 =
116
+ * Quick fix 'are you sure' error on post creation. ([*](https://wordpress.org/support/topic/latest-update-causing-error/), [*](https://wordpress.org/support/topic/error-are-you-sure-you-want-to-do-this-3/))
117
+
118
  = 2.3.0: 2016-12-15 =
119
  * Now compatible with [Video SEO](https://yoast.com/wordpress/plugins/video-seo/)! ([*](https://wordpress.org/support/topic/compatibility-with-video-seo), [*](https://wordpress.org/support/topic/video-seo-featured-video-plus-compatability), [*](https://wordpress.org/support/topic/fantastic-a-must-have-for-all-video-sites))
120
  * Fix AJAX vulnerability reported by [@jamesgol](https://github.com/jamesgol).