Instant Articles for WP - Version 3.3.3

Version Description

Download this release

Release Info

Developer diegoquinteiro
Plugin Icon 128x128 Instant Articles for WP
Version 3.3.3
Comparing to
See all releases

Code changes from version 3.3.2 to 3.3.3

facebook-instant-articles.php CHANGED
@@ -4,7 +4,7 @@
4
  * Description: Add support for Instant Articles for Facebook to your WordPress site.
5
  * Author: Automattic, Dekode, Facebook
6
  * Author URI: https://vip.wordpress.com/plugins/instant-articles/
7
- * Version: 3.3.2
8
  * Text Domain: instant-articles
9
  * License: GPLv2
10
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -61,7 +61,7 @@ if ( version_compare( PHP_VERSION, '5.4', '<' ) ) {
61
 
62
  defined( 'ABSPATH' ) || die( 'Shame on you' );
63
 
64
- define( 'IA_PLUGIN_VERSION', '3.3.2' );
65
  define( 'IA_PLUGIN_PATH_FULL', __FILE__ );
66
  define( 'IA_PLUGIN_PATH', plugin_basename( __FILE__ ) );
67
  define( 'IA_PLUGIN_FILE_BASENAME', pathinfo( __FILE__, PATHINFO_FILENAME ) );
4
  * Description: Add support for Instant Articles for Facebook to your WordPress site.
5
  * Author: Automattic, Dekode, Facebook
6
  * Author URI: https://vip.wordpress.com/plugins/instant-articles/
7
+ * Version: 3.3.3
8
  * Text Domain: instant-articles
9
  * License: GPLv2
10
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
61
 
62
  defined( 'ABSPATH' ) || die( 'Shame on you' );
63
 
64
+ define( 'IA_PLUGIN_VERSION', '3.3.3' );
65
  define( 'IA_PLUGIN_PATH_FULL', __FILE__ );
66
  define( 'IA_PLUGIN_PATH', plugin_basename( __FILE__ ) );
67
  define( 'IA_PLUGIN_FILE_BASENAME', pathinfo( __FILE__, PATHINFO_FILENAME ) );
meta-box/class-instant-articles-meta-box.php CHANGED
@@ -56,6 +56,10 @@ class Instant_Articles_Meta_Box {
56
  * @param Post $post the post request content.
57
  */
58
  public static function render_meta_box_loader( $post ) {
 
 
 
 
59
  include( dirname( __FILE__ ) . '/meta-box-loader-template.php' );
60
  }
61
 
@@ -63,8 +67,13 @@ class Instant_Articles_Meta_Box {
63
  * Renderer for the Metabox.
64
  */
65
  public static function force_submit() {
66
- check_ajax_referer( 'instant-articles-force-submit', 'security' );
67
  $post_id = intval( $_POST[ 'post_ID' ] );
 
 
 
 
 
 
68
  $force = sanitize_text_field( $_POST[ 'force' ] ) === 'true';
69
  update_post_meta( $post_id, Instant_Articles_Publisher::FORCE_SUBMIT_KEY, $force );
70
  Instant_Articles_Publisher::submit_article( $post_id, get_post( $post_id ) );
@@ -74,8 +83,13 @@ class Instant_Articles_Meta_Box {
74
  * Renderer for the Metabox.
75
  */
76
  public static function render_meta_box() {
77
- $ajax_nonce = wp_create_nonce( "instant-articles-force-submit" );
78
  $post_id = intval( $_POST[ 'post_ID' ] );
 
 
 
 
 
 
79
  $post = get_post( $post_id );
80
  $adapter = new Instant_Articles_Post( $post );
81
  $article = $adapter->to_instant_article();
56
  * @param Post $post the post request content.
57
  */
58
  public static function render_meta_box_loader( $post ) {
59
+ if ( ! current_user_can( 'edit_post', $post->ID ) ) {
60
+ return;
61
+ }
62
+
63
  include( dirname( __FILE__ ) . '/meta-box-loader-template.php' );
64
  }
65
 
67
  * Renderer for the Metabox.
68
  */
69
  public static function force_submit() {
 
70
  $post_id = intval( $_POST[ 'post_ID' ] );
71
+
72
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
73
+ wp_die( -1, 403 );
74
+ }
75
+
76
+ check_ajax_referer( 'instant-articles-force-submit-' . $post_id, 'security' );
77
  $force = sanitize_text_field( $_POST[ 'force' ] ) === 'true';
78
  update_post_meta( $post_id, Instant_Articles_Publisher::FORCE_SUBMIT_KEY, $force );
79
  Instant_Articles_Publisher::submit_article( $post_id, get_post( $post_id ) );
83
  * Renderer for the Metabox.
84
  */
85
  public static function render_meta_box() {
 
86
  $post_id = intval( $_POST[ 'post_ID' ] );
87
+
88
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
89
+ wp_die( -1, 403 );
90
+ }
91
+
92
+ $ajax_nonce = wp_create_nonce( "instant-articles-force-submit-" . $post_id );
93
  $post = get_post( $post_id );
94
  $adapter = new Instant_Articles_Post( $post );
95
  $article = $adapter->to_instant_article();
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: trrine, olethomas, bjornjohansen, dekode, automattic, facebook
3
  Tags: instant articles, facebook, mobile
4
  Requires at least: 4.3
5
  Tested up to: 4.6
6
- Stable tag: 3.3.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
3
  Tags: instant articles, facebook, mobile
4
  Requires at least: 4.3
5
  Tested up to: 4.6
6
+ Stable tag: 3.3.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9