Plugin Directory

Changeset 1084819


Ignore:
Timestamp:
02/08/2015 06:43:26 AM (11 years ago)
Author:
toxicToad
Message:

Bugfix: Allow for empty post/page image lists
Fixes "Invalid argument supplied for foreach()..." warning.

Location:
jellyfish-backdrop/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • jellyfish-backdrop/trunk/jellyfish-backdrop.php

    r1075116 r1084819  
    55  Description: Add fullscreen background images and background slideshows to any WordPress page element.
    66  Author: Robert Miller <rob@strawberryjellyfish.com>
    7   Version: 0.6.7
     7  Version: 0.6.8
    88  Author URI: http://strawberryjellyfish.com/
    99*/
     
    3131    public function __construct() {
    3232      if (!defined('JELLYFISH_BACKDROP_VERSION_NUM'))
    33         define('JELLYFISH_BACKDROP_VERSION_NUM', '0.6.1');
     33        define('JELLYFISH_BACKDROP_VERSION_NUM', '0.6.8');
    3434
    3535      update_option('jellyfish_backdrop_version', JELLYFISH_BACKDROP_VERSION_NUM);
     
    101101        // look at post meta for image and slideshow data (override default)
    102102        $images = get_post_meta( get_the_ID(), '_jellyfish_backdrop_images', true );
    103         foreach ( $images as $arr ) {
    104           array_push( $image_array, $arr['_jellyfish_backdrop_image']['url'] );
     103        if (is_array($images)) {
     104          foreach ( $images as $arr ) {
     105            array_push( $image_array, $arr['_jellyfish_backdrop_image']['url'] );
     106          }
    105107        }
    106108
  • jellyfish-backdrop/trunk/readme.txt

    r1075116 r1084819  
    55Plugin URI: http://strawberryjellyfish.com/wordpress-plugin-jellyfish-backdrop/
    66Tags: background, fullscreen, gallery, slideshow, image
    7 Requires at least: 3.0
     7Requires at least: 3.5
    88Tested up to: 4.1
    9 Stable tag: 0.6.7
     9Stable tag: 0.6.8
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    106106== Changelog ==
    107107
     108= 0.6.8 =
     109* Bugfix: Addresses "Invalid argument supplied for foreach()" warning when
     110  post/page images were not defined
     111
    108112= 0.6.7 =
    109113* Bugfix: Global settings were being overridden by post type settings when
Note: See TracChangeset for help on using the changeset viewer.