Dynamic Featured Image - Version 3.6.1

Version Description

  • Remove short array syntax to support php <
Download this release

Release Info

Developer ankitpokhrel
Plugin Icon wp plugin Dynamic Featured Image
Version 3.6.1
Comparing to
See all releases

Code changes from version 3.6.0 to 3.6.1

Files changed (2) hide show
  1. dynamic-featured-image.php +5 -5
  2. readme.txt +8 -1
dynamic-featured-image.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Dynamic Featured Image
4
  * Plugin URI: http://wordpress.org/plugins/dynamic-featured-image/
5
  * Description: Dynamically adds multiple featured image or post thumbnail functionality to your posts, pages and custom post types.
6
- * Version: 3.6.0
7
  * Author: Ankit Pokhrel
8
  * Author URI: https://ankitpokhrel.com
9
  * License: GPL2 or later
@@ -49,7 +49,7 @@ class Dynamic_Featured_Image {
49
  *
50
  * @since 3.0.0
51
  */
52
- const VERSION = '3.6.0';
53
 
54
  /**
55
  * Text domain.
@@ -543,7 +543,7 @@ class Dynamic_Featured_Image {
543
 
544
  // Check permission before saving data.
545
  if ( current_user_can( 'edit_posts', $post_id ) && isset( $_POST['dfiFeatured'] ) ) { // WPCS: CSRF ok.
546
- $featured_images = is_array( $_POST['dfiFeatured'] ) ? $_POST['dfiFeatured'] : []; // WPCS: sanitization ok, CSRF ok.
547
 
548
  update_post_meta( $post_id, 'dfiFeatured', $this->sanitize_array( $featured_images ) );
549
  }
@@ -560,7 +560,7 @@ class Dynamic_Featured_Image {
560
  * @return array
561
  */
562
  protected function sanitize_array( $input_array ) {
563
- $sanitized = [];
564
 
565
  foreach ( $input_array as $value ) {
566
  $sanitized[] = sanitize_text_field( wp_unslash( $value ) );
@@ -861,7 +861,7 @@ class Dynamic_Featured_Image {
861
  if ( ! empty( $dfi_images ) && is_array( $dfi_images ) ) {
862
  foreach ( $dfi_images as $dfi_image ) {
863
  $dfi_image_full = $this->separate( $dfi_image, 'full' );
864
- $ret_val[] = (int) $this->get_image_id( $this->upload_url . $dfi_image_full );
865
  }
866
  }
867
 
3
  * Plugin Name: Dynamic Featured Image
4
  * Plugin URI: http://wordpress.org/plugins/dynamic-featured-image/
5
  * Description: Dynamically adds multiple featured image or post thumbnail functionality to your posts, pages and custom post types.
6
+ * Version: 3.6.1
7
  * Author: Ankit Pokhrel
8
  * Author URI: https://ankitpokhrel.com
9
  * License: GPL2 or later
49
  *
50
  * @since 3.0.0
51
  */
52
+ const VERSION = '3.6.1';
53
 
54
  /**
55
  * Text domain.
543
 
544
  // Check permission before saving data.
545
  if ( current_user_can( 'edit_posts', $post_id ) && isset( $_POST['dfiFeatured'] ) ) { // WPCS: CSRF ok.
546
+ $featured_images = is_array( $_POST['dfiFeatured'] ) ? $_POST['dfiFeatured'] : array(); // WPCS: sanitization ok, CSRF ok.
547
 
548
  update_post_meta( $post_id, 'dfiFeatured', $this->sanitize_array( $featured_images ) );
549
  }
560
  * @return array
561
  */
562
  protected function sanitize_array( $input_array ) {
563
+ $sanitized = array();
564
 
565
  foreach ( $input_array as $value ) {
566
  $sanitized[] = sanitize_text_field( wp_unslash( $value ) );
861
  if ( ! empty( $dfi_images ) && is_array( $dfi_images ) ) {
862
  foreach ( $dfi_images as $dfi_image ) {
863
  $dfi_image_full = $this->separate( $dfi_image, 'full' );
864
+ $ret_val[] = (int) $this->get_image_id( $this->upload_url . $dfi_image_full );
865
  }
866
  }
867
 
readme.txt CHANGED
@@ -4,7 +4,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: dynamic featured image, featured image, post thumbnail, dynamic post thumbnail, multiple featured image, multiple post thumbnail
5
  Requires at least: 3.8
6
  Tested up to: 4.8.1
7
- Stable tag: 3.6.0
 
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -116,6 +117,9 @@ Please feel free to report any bug found at https://github.com/ankitpokhrel/Dyna
116
  3. Add new featured image box.
117
 
118
  == Changelog ==
 
 
 
119
  = 3.6.0 =
120
  * Various security fixes.
121
  * Missing text domains fixes.
@@ -218,6 +222,9 @@ Please feel free to report any bug found at https://github.com/ankitpokhrel/Dyna
218
  * Fixed some minor issues.
219
 
220
  == Upgrade Notice ==
 
 
 
221
  = 3.6.0 =
222
  * Various security fixes.
223
 
4
  Tags: dynamic featured image, featured image, post thumbnail, dynamic post thumbnail, multiple featured image, multiple post thumbnail
5
  Requires at least: 3.8
6
  Tested up to: 4.8.1
7
+ Stable tag: 3.6.1
8
+ Requires PHP: 5.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
117
  3. Add new featured image box.
118
 
119
  == Changelog ==
120
+ = 3.6.1 =
121
+ * Remove short array syntax to support php <= 5.4.
122
+
123
  = 3.6.0 =
124
  * Various security fixes.
125
  * Missing text domains fixes.
222
  * Fixed some minor issues.
223
 
224
  == Upgrade Notice ==
225
+ = 3.6.1 =
226
+ * Remove short array syntax to support php <= 5.4.
227
+
228
  = 3.6.0 =
229
  * Various security fixes.
230