Plugin Directory

Changeset 950755


Ignore:
Timestamp:
07/18/2014 02:24:57 AM (12 years ago)
Author:
bgentry
Message:

made two changes to make the "one question open at a time" feature work in more circumstances

Location:
easy-faq-with-expanding-text
Files:
21 added
3 edited

Legend:

Unmodified
Added
Removed
  • easy-faq-with-expanding-text/trunk/faq.php

    r879239 r950755  
    33Plugin Name: Easy FAQ with Expanding Text
    44Description: Easily create a Frequently Asked Questions page with answers that slide down when the questions are clicked. No need for a shortcode, HTML coding, or javascript tweaking.
    5 Version: 3.2.5
     5Version: 3.2.6
    66Author: bgentry
    77Author URI: http://bryangentry.us
     
    378378
    379379function bg_faq_shortcode_start() {
    380     $foldupOptions = get_post_meta($post->ID, 'bgFAQfoldup', true);
     380    $foldupOptions = get_post_meta(get_the_ID(), 'bgFAQfoldup', true);
    381381    if ( $foldupOptions == 'default' || $foldupOptions == false ) {
    382382        $faqoptions = get_option('bg_faq_options');
     
    386386            $foldup = $foldupOptions;
    387387        }
     388       
    388389    return '<div data-foldup="'.$foldup.'" class="bg_faq_content_section">';
    389390}
  • easy-faq-with-expanding-text/trunk/faqmaker.js

    r820690 r950755  
    3030        else {                                                          //if it isn't opened,
    3131        if(foldup=='yes') {                                             //check to see we are supposed to fold up other content so only one answer shows at a time.
    32                 $(this).parent('.bg_faq_content_section').find('.bg_faq_opened').not(this).each(function(){                 //if so...
     32//      console.log('foldup = yes');
     33               
     34                $(this).parents('.bg_faq_content_section').eq(0).find('.bg_faq_opened').not(this).each(function(){                  //if so...
    3335                $(this).nextUntil(':header').slideUp();         //foldup other content and mark the headings as closed
    3436                $(this).removeClass('bg_faq_opened').addClass('bg_faq_closed');
  • easy-faq-with-expanding-text/trunk/readme.txt

    r879239 r950755  
    33Donate link: http://bryangentry.us/pay-me
    44Tags: faq pages
    5 Tested up to: 3.8
    6 Stable tag: 3.2.5
     5Tested up to: 3.9.1
     6Stable tag: 3.2.6
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2323
    2424== Changelog ==
     25
     26=3.2.6=
     27*Fixed code that was preventing the "one question open at a time" feature from working when the shortcode was used.
     28*Updated program to allow the one question open at a time to work even when there are additional divs and other elements wrapping the content.
    2529
    2630=3.2.5=
Note: See TracChangeset for help on using the changeset viewer.