Plugin Directory

Changeset 1075116


Ignore:
Timestamp:
01/25/2015 02:07:08 AM (11 years ago)
Author:
toxicToad
Message:

Bugfix: Post-type settings should only override global if there are images present

Location:
jellyfish-backdrop/trunk
Files:
2 edited

Legend:

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

    r1064293 r1075116  
    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.6
     7  Version: 0.6.7
    88  Author URI: http://strawberryjellyfish.com/
    99*/
     
    8989      $slide_duration = is_numeric( $options['slide_duration'] ) ? $options['slide_duration'] : 5;
    9090
    91       $container = $options['container'] ? $options['container'] : 'body';
     91      $container = isset($options['container']) ? $options['container'] : 'body';
    9292
    9393      $image_array = array();
     
    105105        }
    106106
    107         $post_container = get_post_meta( get_the_ID(), '_jellyfish_backdrop_container', true );
    108         if ( $post_container ) $container = $post_container;
     107        if ( !empty( $image_array ) ) {
     108          $post_container = get_post_meta( get_the_ID(), '_jellyfish_backdrop_container', true );
     109          if ( $post_container ) $container = $post_container;
    109110
    110         $post_fade_speed = get_post_meta( get_the_ID(), '_jellyfish_backdrop_fade_speed', true );
    111         if ( $post_fade_speed ) $fade_speed = $post_fade_speed;
     111          $post_fade_speed = get_post_meta( get_the_ID(), '_jellyfish_backdrop_fade_speed', true );
     112          if ( $post_fade_speed ) $fade_speed = $post_fade_speed;
    112113
    113         $post_slide_duration = get_post_meta( get_the_ID(), '_jellyfish_backdrop_slide_duration', true );
    114         if ( $post_slide_duration ) $slide_duration = $post_slide_duration;
     114          $post_slide_duration = get_post_meta( get_the_ID(), '_jellyfish_backdrop_slide_duration', true );
     115          if ( $post_slide_duration ) $slide_duration = $post_slide_duration;
     116        }
    115117      }
    116118
  • jellyfish-backdrop/trunk/readme.txt

    r1064293 r1075116  
    77Requires at least: 3.0
    88Tested up to: 4.1
    9 Stable tag: 0.6.6
     9Stable tag: 0.6.7
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7878By default images are shown as the main page background (body), however you
    7979can make the images appear as backgrounds to other areas of the page by
    80 supplying any valid element id or classname in the Container field on the
     80supplying any valid element id or class name in the Container field on the
    8181admin page. eg. #main, .header
    8282
     
    105105
    106106== Changelog ==
     107
     108= 0.6.7 =
     109* Bugfix: Global settings were being overridden by post type settings when
     110  there were no images. Now correctly uses global settings for container,
     111  duration etc.
    107112
    108113= 0.6.6 =
Note: See TracChangeset for help on using the changeset viewer.