Plugin Directory

Changeset 1454829


Ignore:
Timestamp:
07/14/2016 04:01:52 PM (10 years ago)
Author:
filmmaker3000
Message:

updated bug

Location:
night-carousel-plus/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • night-carousel-plus/trunk/README.md

    r1454787 r1454829  
    1 # Night-Carousel-Plus v1.1.3
     1# Night-Carousel-Plus
    22### A WordPress Plugin using the Owl Carousel jQuery Plugin
    33#### By Matt Vona
     
    3636- Feel free to submit ideas!
    3737
    38 #### v1.1.3
     38#### v1.1.4
     39- Fixed bug that displayed PHP notice when carousel did not exist.
     40
     41v1.1.3
    3942- Changed name for WordPress Plugin manager
    4043- updated bug that showed notice if the carousel did not exist
  • night-carousel-plus/trunk/src/ncp-shortcodes.php

    r1454764 r1454829  
    1313    $atts = shortcode_atts(
    1414        array(
    15             'carousel' => '',
     15            'carousel' => null,
    1616            'limit' => '-1',
    1717        ),
     
    2121
    2222    //* Set Term if the carousel flag is set
    23     if ($carousel != '') {
    24         if (isset($carousel->term_id)) {
    25             $termID = get_term_by('name', $carousel, 'ncp-carousel')->term_id;
     23    if ($carousel != null) {
     24        $termID = get_term_by('name', $carousel, 'ncp-carousel');
     25        if (!isset($termID->term_id)) {
     26            return "The carousel does not exist.";
    2627        }
    27     }
     28    } 
    2829
    2930    //* Hook the javascript for the slider
     
    5657           
    5758            //* Run the custom filter function
    58             echo ncp_filter(get_option( "taxonomy_$termID" )['ncp_custom_options']['slider_template'], $ncpSlideQuery->post);
     59            echo ncp_filter(get_option( "taxonomy_$termID->term_id" )['ncp_custom_options']['slider_template'], $ncpSlideQuery->post);
    5960            $i++;
    6061        }
     
    6566    } else {
    6667        // no posts found
    67         echo "No slides found in this carousel.";
     68        echo "The carousel does not exist or no slides were found.";
    6869    }
    6970
Note: See TracChangeset for help on using the changeset viewer.