Quick Featured Images - Version 12.1

Version Description

  • Fixed fatal error at plugin activation
  • Fixed missing default settings
Download this release

Release Info

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

Code changes from version 12.0 to 12.1

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: add, arabic, assign, associate, attach, attachment, attachments, audio, audios, author, auto, automatic, batch, brazilian, bulk, categories, category, change, column, control, custom post type, custom post types, custom taxonomies, custom taxonomy, date, dates, default, define, delete, detach, exchange, featured, featured image, featured images, filter, gallery, galleries, image, image size, images, mass, media, mime, multimedia, nextgen, pages, parent page, period, português do brasil, portuguese, post type, post types, posts, quick, random, rapid, remove, replace, rules, search, set, standard, tag, taxonomies, taxonomy, thumb, thumbnail, thumbnails, thumbs, time, unset, update, user, video, videos, spanish, español, deutsch, german
5
  Requires at least: 3.8
6
  Tested up to: 4.6
7
- Stable tag: 12.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -277,6 +277,10 @@ If you want to contribute a translation of the plugin in your language it would
277
 
278
  == Changelog ==
279
 
 
 
 
 
280
  = 12.0 =
281
  * In Pro version: Added in Presets: option for displaying random featured images at each page load
282
  * Changed menu item name 'Image Columns' to 'Settings'
@@ -581,6 +585,9 @@ Fixed an insufficient security check which prevented to set a featured image
581
 
582
  == Upgrade Notice ==
583
 
 
 
 
584
  = 12.0 =
585
  New features: user role option, action links in image columns, tested with WP 4.6
586
 
4
  Tags: add, arabic, assign, associate, attach, attachment, attachments, audio, audios, author, auto, automatic, batch, brazilian, bulk, categories, category, change, column, control, custom post type, custom post types, custom taxonomies, custom taxonomy, date, dates, default, define, delete, detach, exchange, featured, featured image, featured images, filter, gallery, galleries, image, image size, images, mass, media, mime, multimedia, nextgen, pages, parent page, period, português do brasil, portuguese, post type, post types, posts, quick, random, rapid, remove, replace, rules, search, set, standard, tag, taxonomies, taxonomy, thumb, thumbnail, thumbnails, thumbs, time, unset, update, user, video, videos, spanish, español, deutsch, german
5
  Requires at least: 3.8
6
  Tested up to: 4.6
7
+ Stable tag: 12.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
277
 
278
  == Changelog ==
279
 
280
+ = 12.1 =
281
+ * Fixed fatal error at plugin activation
282
+ * Fixed missing default settings
283
+
284
  = 12.0 =
285
  * In Pro version: Added in Presets: option for displaying random featured images at each page load
286
  * Changed menu item name 'Image Columns' to 'Settings'
585
 
586
  == Upgrade Notice ==
587
 
588
+ = 12.1 =
589
+ Fixed fatal error at plugin activation, fixed missing default settings
590
+
591
  = 12.0 =
592
  New features: user role option, action links in image columns, tested with WP 4.6
593
 
admin/class-quick-featured-images-admin.php CHANGED
@@ -19,7 +19,7 @@
19
  *
20
  * @var string
21
  */
22
- protected $plugin_version = '12.0';
23
 
24
  /**
25
  * Instance of this class.
19
  *
20
  * @var string
21
  */
22
+ protected $plugin_version = '12.1';
23
 
24
  /**
25
  * Instance of this class.
admin/class-quick-featured-images-settings.php CHANGED
@@ -320,13 +320,13 @@ class Quick_Featured_Images_Settings {
320
  private static function set_default_settings() {
321
 
322
  // check if there are already stored settings under the option's database slug
323
- if ( false === get_option( $this->settings_db_slug, false ) ) {
324
  // store default values in the db as a single and serialized entry
325
  add_option(
326
- $db_slug,
327
  array(
328
- 'show_posts_images' => '1',
329
- 'show_pages_images' => '1',
330
  'minimum_role_all_pages' => 'editor',
331
  )
332
  );
@@ -463,9 +463,13 @@ class Quick_Featured_Images_Settings {
463
  * @return array Options and their sanatized values
464
  */
465
  public function sanitize_options ( $input ) {
466
- // exit with empty array if no option was checked
467
  if ( ! $input ) {
468
- return array();
 
 
 
 
469
  }
470
  $sanitized_input = array();
471
  foreach ( $input as $key => $value ) {
@@ -483,7 +487,7 @@ class Quick_Featured_Images_Settings {
483
  } // foreach()
484
 
485
  // default settinga if not defined
486
- if ( ! isset( $sanitized_input[ 'minimum_role_all_pages' ] ) ) {
487
  $sanitized_input[ 'minimum_role_all_pages' ] = 'editor';
488
  }
489
 
320
  private static function set_default_settings() {
321
 
322
  // check if there are already stored settings under the option's database slug
323
+ if ( false === get_option( 'quick-featured-images-settings', false ) ) {
324
  // store default values in the db as a single and serialized entry
325
  add_option(
326
+ 'quick-featured-images-settings',
327
  array(
328
+ 'column_thumb_post' => '1',
329
+ 'column_thumb_page' => '1',
330
  'minimum_role_all_pages' => 'editor',
331
  )
332
  );
463
  * @return array Options and their sanatized values
464
  */
465
  public function sanitize_options ( $input ) {
466
+ // exit default array if null input
467
  if ( ! $input ) {
468
+ return array(
469
+ 'column_thumb_post' => '1',
470
+ 'column_thumb_page' => '1',
471
+ 'minimum_role_all_pages' => 'editor',
472
+ );
473
  }
474
  $sanitized_input = array();
475
  foreach ( $input as $key => $value ) {
487
  } // foreach()
488
 
489
  // default settinga if not defined
490
+ if ( ! array_key_exists( 'minimum_role_all_pages', $sanitized_input ) ) {
491
  $sanitized_input[ 'minimum_role_all_pages' ] = 'editor';
492
  }
493
 
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, set default images, get overview lists.
13
- * Version: 12.0
14
  * Author: Martin Stehle
15
  * Author URI: http://stehle-internet.de
16
  * Text Domain: quick-featured-images
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, set default images, get overview lists.
13
+ * Version: 12.1
14
  * Author: Martin Stehle
15
  * Author URI: http://stehle-internet.de
16
  * Text Domain: quick-featured-images