Quick Featured Images - Version 13.5.4

Version Description

  • Fixed assignments errors in the image column on the post overview page
Download this release

Release Info

Developer Hinjiriyo
Plugin Icon 128x128 Quick Featured Images
Version 13.5.4
Comparing to
See all releases

Code changes from version 13.5.3 to 13.5.4

README.txt CHANGED
@@ -4,7 +4,7 @@ Tags: featured image,featured images,bulk set,automatic,thumbnails
4
  Requires at least: 3.8
5
  Requires PHP: 5.2
6
  Tested up to: 5.6
7
- Stable tag: 13.5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -239,6 +239,9 @@ If you want to contribute a translation of the plugin in your language it would
239
 
240
  == Changelog ==
241
 
 
 
 
242
  = 13.5.3 =
243
  * Corrected some texts
244
 
@@ -471,6 +474,9 @@ Added spanish translation for the main texts of the plugin
471
 
472
  == Upgrade Notice ==
473
 
 
 
 
474
  = 13.5.3 =
475
  Corrected some texts
476
 
4
  Requires at least: 3.8
5
  Requires PHP: 5.2
6
  Tested up to: 5.6
7
+ Stable tag: 13.5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
239
 
240
  == Changelog ==
241
 
242
+ = 13.5.4 =
243
+ * Fixed assignments errors in the image column on the post overview page
244
+
245
  = 13.5.3 =
246
  * Corrected some texts
247
 
474
 
475
  == Upgrade Notice ==
476
 
477
+ = 13.5.4 =
478
+ Fixed assignments errors in the image column on the post overview page
479
+
480
  = 13.5.3 =
481
  Corrected some texts
482
 
admin/class-quick-featured-images-admin.php CHANGED
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
21
  *
22
  * @var string
23
  */
24
- protected $plugin_version = '13.5.3';
25
 
26
  /**
27
  * Instance of this class.
21
  *
22
  * @var string
23
  */
24
+ protected $plugin_version = '13.5.4';
25
 
26
  /**
27
  * Instance of this class.
admin/class-quick-featured-images-columns.php CHANGED
@@ -376,8 +376,8 @@ class Quick_Featured_Images_Columns {
376
  * @return array extended list of columns
377
  */
378
  public function display_thumbnail_in_column( $column_name, $post_id ) {
379
- $width = $height = $this->used_thumbnail_width;
380
  if ( $this->thumbnail_column_name == $column_name ) {
 
381
  $thumbnail_id = get_post_thumbnail_id( $post_id );
382
  // check if image file exists, omit filters in get_attached_file() ('true')
383
  if ( $thumbnail_id ) {
@@ -385,61 +385,67 @@ class Quick_Featured_Images_Columns {
385
  if ( empty( $this->thumbnail_cache[ $thumbnail_id ] ) ) {
386
  // if the image file does exist
387
  if ( file_exists( get_attached_file( $thumbnail_id, true ) ) && $thumb = wp_get_attachment_image( $thumbnail_id, array( $width, $height ) ) ) {
388
- // create thumbnail HTML
389
- if ( current_user_can( $this->required_user_cap, $thumbnail_id ) ) {
390
- // show image linked to media selection box
391
- $thumb_title = _draft_or_post_title( $thumbnail_id );
392
- $this->thumbnail_cache[ $thumbnail_id ] = sprintf(
393
- '<a href="%s" id="qfi_set_%d" class="qfi_set_fi" title="%s">%s<br />%s</a>',
394
- esc_url( get_upload_iframe_src( 'image', $post_id ) ),
395
- $post_id,
396
- esc_attr( sprintf( $this->translation_cache[ 'Change x' ], $thumb_title ) ),
397
- $thumb,
398
- $this->translation_cache[ 'Change image' ]
399
- );
400
- // display 'edit' link
401
- $this->thumbnail_cache[ $thumbnail_id ] .= sprintf(
402
- '<br /><a href="%s" title="%s">%s</a>',
403
- esc_url( get_edit_post_link( $thumbnail_id ) ),
404
- esc_attr( sprintf( $this->translation_cache[ 'Edit x' ], $thumb_title ) ),
405
- $this->translation_cache[ 'Edit Image' ]
406
- );
407
- // display removal link
408
- $this->thumbnail_cache[ $thumbnail_id ] .= sprintf(
409
- '<br /><a href="#" id="qfi_delete_%d" class="qfi_delete_fi hide-if-no-js" title="%s">%s</a>',
410
- $post_id,
411
- esc_attr( sprintf( $this->translation_cache[ 'Remove x' ], $thumb_title ) ),
412
- $this->translation_cache[ 'Remove featured image' ]
413
- );
414
- } else {
415
- // if no edit capatibilities show image only
416
- $this->thumbnail_cache[ $thumbnail_id ] = $thumb;
417
- } // if ( current_user_can( $this->required_user_cap, $thumbnail_id ) )
418
- // thumbnail ID is orphaned ("file-less", outdated), so create HTML for a "broken image" symbol
419
  } else {
420
- // print "broken" icon
421
- $this->thumbnail_cache[ $thumbnail_id ] = $this->thumbnail_cache[ 'No file was uploaded.' ];
422
- if ( $this->is_capable_user ) {
423
- // display removal link
424
- $this->thumbnail_cache[ $thumbnail_id ] .= sprintf(
425
- '<br /><a href="#" id="qfi_delete_%d" class="qfi_delete_fi hide-if-no-js" title="%s">%s</a>',
426
- $post_id,
427
- esc_attr( sprintf( $this->translation_cache[ 'Delete x' ], $this->translation_cache[ 'Meta' ] ) ),
428
- $this->translation_cache[ 'Delete' ]
429
- );
430
- // print creation link
431
- $this->thumbnail_cache[ $thumbnail_id ] .= sprintf(
432
- '<br /><a href="%s" id="qfi_set_%d" class="qfi_set_fi" title="%s">%s</a>',
433
- esc_url( get_upload_iframe_src( 'image', $post_id ) ),
434
- $post_id,
435
- esc_attr( sprintf( $this->translation_cache[ 'Set image for x' ], _draft_or_post_title( $post_id ) ) ),
436
- $this->translation_cache[ 'Set featured image' ]
437
- );
438
- } // if ( $this->is_capable_user )
439
- } // if ( file_exists( get_attached_file( $thumbnail_id, true ) ) && $thumb = wp_get_attachment_image( $thumbnail_id, array( $width, $height ) ) )
440
- } // if ( empty( $this->thumbnail_cache[ $thumbnail_id ] ) )
441
- // print thumbnail HTML code
442
- echo $this->thumbnail_cache[ $thumbnail_id ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
  } else {
444
  // print note
445
  echo $this->translation_cache[ 'No image set' ];
376
  * @return array extended list of columns
377
  */
378
  public function display_thumbnail_in_column( $column_name, $post_id ) {
 
379
  if ( $this->thumbnail_column_name == $column_name ) {
380
+ $width = $height = $this->used_thumbnail_width;
381
  $thumbnail_id = get_post_thumbnail_id( $post_id );
382
  // check if image file exists, omit filters in get_attached_file() ('true')
383
  if ( $thumbnail_id ) {
385
  if ( empty( $this->thumbnail_cache[ $thumbnail_id ] ) ) {
386
  // if the image file does exist
387
  if ( file_exists( get_attached_file( $thumbnail_id, true ) ) && $thumb = wp_get_attachment_image( $thumbnail_id, array( $width, $height ) ) ) {
388
+ // cache the thumb
389
+ $this->thumbnail_cache[ $thumbnail_id ] = $thumb;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  } else {
391
+ // cache it as not available
392
+ $this->thumbnail_cache[ $thumbnail_id ] = false;
393
+ }
394
+ }
395
+ // if there is an image, display it
396
+ if ( $this->thumbnail_cache[ $thumbnail_id ] ) {
397
+ // print thumbnail HTML
398
+ if ( current_user_can( $this->required_user_cap, $thumbnail_id ) ) {
399
+ // show image linked to media selection box
400
+ $thumb_title = _draft_or_post_title( $thumbnail_id );
401
+ printf(
402
+ '<a href="%s" id="qfi_set_%d" class="qfi_set_fi" title="%s">%s<br />%s</a>',
403
+ esc_url( get_upload_iframe_src( 'image', $post_id ) ),
404
+ $post_id,
405
+ esc_attr( sprintf( $this->translation_cache[ 'Change x' ], $thumb_title ) ),
406
+ $this->thumbnail_cache[ $thumbnail_id ],
407
+ $this->translation_cache[ 'Change image' ]
408
+ );
409
+ // display 'edit' link
410
+ printf(
411
+ '<br /><a href="%s" title="%s">%s</a>',
412
+ esc_url( get_edit_post_link( $thumbnail_id ) ),
413
+ esc_attr( sprintf( $this->translation_cache[ 'Edit x' ], $thumb_title ) ),
414
+ $this->translation_cache[ 'Edit Image' ]
415
+ );
416
+ // display removal link
417
+ printf(
418
+ '<br /><a href="#" id="qfi_delete_%d" class="qfi_delete_fi hide-if-no-js" title="%s">%s</a>',
419
+ $post_id,
420
+ esc_attr( sprintf( $this->translation_cache[ 'Remove x' ], $thumb_title ) ),
421
+ $this->translation_cache[ 'Remove featured image' ]
422
+ );
423
+ } else {
424
+ // if no edit capatibilities, show image only
425
+ echo $this->thumbnail_cache[ $thumbnail_id ];
426
+ } // if ( current_user_can( $this->required_user_cap, $thumbnail_id ) )
427
+ // thumbnail ID is orphaned ("file-less", outdated), so create HTML for a "broken image" symbol
428
+ } else {
429
+ // print "broken" icon
430
+ echo $this->thumbnail_cache[ 'No file was uploaded.' ];
431
+ if ( $this->is_capable_user ) {
432
+ // display removal link
433
+ printf(
434
+ '<br /><a href="#" id="qfi_delete_%d" class="qfi_delete_fi hide-if-no-js" title="%s">%s</a>',
435
+ $post_id,
436
+ esc_attr( sprintf( $this->translation_cache[ 'Delete x' ], $this->translation_cache[ 'Meta' ] ) ),
437
+ $this->translation_cache[ 'Delete' ]
438
+ );
439
+ // print creation link
440
+ printf(
441
+ '<br /><a href="%s" id="qfi_set_%d" class="qfi_set_fi" title="%s">%s</a>',
442
+ esc_url( get_upload_iframe_src( 'image', $post_id ) ),
443
+ $post_id,
444
+ esc_attr( sprintf( $this->translation_cache[ 'Set image for x' ], _draft_or_post_title( $post_id ) ) ),
445
+ $this->translation_cache[ 'Set featured image' ]
446
+ );
447
+ } // if ( $this->is_capable_user )
448
+ } // if ( $this->thumbnail_cache[ $thumbnail_id ] )
449
  } else {
450
  // print note
451
  echo $this->translation_cache[ 'No image set' ];
quick-featured-images.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: Quick Featured Images
11
  * Plugin URI: http://wordpress.org/plugins/quick-featured-images
12
  * Description: Your time-saving Swiss Army Knife for featured images: Set, replace and delete them in bulk, in posts lists and set default images for future posts.
13
- * Version: 13.5.3
14
  * Requires at least: 3.8
15
  * Requires PHP: 5.2
16
  * Author: Martin Stehle
10
  * Plugin Name: Quick Featured Images
11
  * Plugin URI: http://wordpress.org/plugins/quick-featured-images
12
  * Description: Your time-saving Swiss Army Knife for featured images: Set, replace and delete them in bulk, in posts lists and set default images for future posts.
13
+ * Version: 13.5.4
14
  * Requires at least: 3.8
15
  * Requires PHP: 5.2
16
  * Author: Martin Stehle