Plugin Directory

Changeset 2843496


Ignore:
Timestamp:
01/04/2023 02:59:35 PM (3 years ago)
Author:
reholmes27
Message:

version 1.3.7

Location:
responsive-accordion-tabs/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • responsive-accordion-tabs/trunk/assets/js/a11y-accordion-tabs.js

    r2831013 r2843496  
    2929            options
    3030        );
    31 
     31       
    3232        if (el.getAttribute('data-tabs-allowed') == 'true') {
    3333            this.options.tabsAllowed = true;
     
    4646                el.getAttribute('data-selected-tab')
    4747            );
     48        }
     49       
     50        if (el.getAttribute('data-start-collapsed') == 'true') {
     51            this.options.startCollapsed = true;
     52        } else if (el.getAttribute('data-start-collapsed') === undefined || el.getAttribute('data-start-collapsed') == 'false') {
     53            this.options.startCollapsed = false;
    4854        }
    4955       
  • responsive-accordion-tabs/trunk/includes/admin/class-posts.php

    r2831047 r2843496  
    255255                        <label for="accordion-tab-hashvalue">Hash Value:</label>
    256256                        <input id="accordion-tab-hashvalue" class="fullwidth" type="text" name="accordion-tab-hashvalue[]" value="" placeholder="tab<?php
    257         echo  esc_attr( $key ) + 1 ;
     257        echo  esc_attr( $key + 1 ) ;
    258258        ?>" />
    259259                    </p>
     
    332332            <input type='checkbox' name='accordion-tab-hide-description' value='1' <?php
    333333        checked( ( isset( $tabs_settings['hide_description'] ) ? $tabs_settings['hide_description'] : '' ), '1' );
    334         ?> /> Hide description
     334        ?> /> Hide description<br />
     335            <input type='checkbox' name='accordion-tab-hide-tabs' value='1' <?php
     336        checked( ( isset( $tabs_settings['tabs_allowed'] ) && $tabs_settings['tabs_allowed'] ? '' : '1' ), '1' );
     337        ?> /> Hide tabs<br /> <small>Show accordions only</small>
    335338        </div>
    336339       
     
    354357        }
    355358        ?></p>
     359        </div>
     360       
     361        <div class="accordion-tab-direction-meta-wrap components-base-control__field">
     362            <p class="post-attributes-label-wrapper">
     363                <strong> Selected Tab </strong>
     364            </p>
     365            <input id="accordion-tab-selected" class="fullwidth" type="text" name="accordion-tab-selected" value="<?php
     366        echo  ( isset( $tabs_settings['selected_tab'] ) ? esc_attr( $tabs_settings['selected_tab'] ) : '' ) ;
     367        ?>" placeholder="0" /><br />
     368            <p>Index number of tab to first show as open. Start at 0 for first, 1 for second....</p>
     369        </div>
     370       
     371        <div class="accordion-tab-direction-meta-wrap components-base-control__field">
     372            <p class="post-attributes-label-wrapper">
     373                <strong> Collapse Accordion </strong>
     374            </p>
     375            <input type='checkbox' name='accordion-tab-collapsed' value='1' <?php
     376        checked( ( isset( $tabs_settings['start_collapsed'] ) && $tabs_settings['start_collapsed'] ? '1' : '' ), '1' );
     377        ?> /> Collapse Accordions
     378            <p>Tick if you would accordions to be closed on page load.</p>
    356379        </div>
    357380<?php
     
    412435        $description = wp_kses_post( $_POST["accordion-tab-hide-description"] );
    413436        $direction = sanitize_text_field( $_POST["accordion-tab-direction"] );
     437        $collapse = sanitize_text_field( $_POST["accordion-tab-collapsed"] );
     438        $hide_tabs = sanitize_text_field( $_POST["accordion-tab-hide-tabs"] );
     439        $selected = sanitize_text_field( $_POST["accordion-tab-selected"] );
    414440        $tab_settings = array(
    415441            'theme'            => $theme,
    416442            'breakpoint'       => $breakpoint,
    417             'tabs_allowed'     => true,
    418             'selected_tab'     => 0,
    419             'start_collapsed'  => false,
     443            'tabs_allowed'     => ( $hide_tabs ? false : true ),
     444            'selected_tab'     => ( !empty($selected) ? $selected : 0 ),
     445            'start_collapsed'  => ( $collapse ? true : false ),
    420446            'hide_title'       => $title,
    421447            'hide_description' => $description,
  • responsive-accordion-tabs/trunk/includes/admin/class-settings.php

    r2744117 r2843496  
    6969<?php
    7070        ?>
     71           
    7172            </nav>
    7273           
     
    7576        switch ( $tab ) {
    7677            case 'styles':
     78                break;
     79            case 'export':
     80                break;
     81            case 'import':
    7782                break;
    7883            default:
  • responsive-accordion-tabs/trunk/includes/frontend/class-shortcodes.php

    r2834570 r2843496  
    5959        <?php   }
    6060                if ( !$atts["hide_description"] ) {
    61                     echo get_the_content( "", false, $atts["id"] );
     61                    echo apply_filters( 'the_content', get_the_content( "", false, $atts["id"] ) );
    6262                } ?>
    6363                </div>
     
    6565<?php       $tabs_data = get_post_meta( $atts["id"], 'accordion_tab_data', true ); ?>
    6666   
    67                 <div class="accordion-tabs js-tabs <?php echo esc_attr( $atts["theme"] ); ?> <?php echo esc_attr( $atts["direction"] ); ?>" data-breakpoint="<?php echo esc_attr( $atts['breakpoint'] ); ?>" data-tabsAllowed="<?php echo esc_attr( $atts['tabs_allowed'] ); ?>" data-selectedTab="<?php echo esc_attr( $atts['selected_tab'] ); ?>" data-startCollapsed="<?php echo esc_attr( $atts['start_collapsed'] ); ?>">
     67                <div class="accordion-tabs js-tabs <?php echo esc_attr( $atts["theme"] ); ?> <?php echo esc_attr( $atts["direction"] ); ?>" data-breakpoint="<?php echo esc_attr( $atts['breakpoint'] ); ?>" data-tabs-allowed="<?php echo ( !$atts['tabs_allowed'] ? 'false' : 'true' ); ?>" data-selected-tab="<?php echo esc_attr( $atts['selected_tab'] ); ?>" data-start-collapsed="<?php echo ( !$atts['start_collapsed'] ? 'false' : 'true' ); ?>">
    6868               
    6969<?php           if ( !empty( $tabs_data ) ) { ?>
  • responsive-accordion-tabs/trunk/readme.txt

    r2834570 r2843496  
    99Tested up to: 6.1
    1010Requires PHP: 7.4
    11 Stable tag: 1.3.6
    12 Version: 1.3.6
     11Stable tag: 1.3.7
     12Version: 1.3.7
    1313License: GPLv3 or later
    1414License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3636
    3737== Changelog ==
     381.3.7
     39- NEW: Add additional setting options: collapse on load, set selected tab, hide tabs
     40- NEW: Add an export / import option to premium plugin, to save settings and styles
     41- FIX: Potential fatal error adding new accordion tabs
     42
    38431.3.6
    3944- NEW: Add wrapper div to title and description
  • responsive-accordion-tabs/trunk/responsive-accordion-tabs.php

    r2834570 r2843496  
    1010 *
    1111 * @link             
    12  * @since             1.3.6
     12 * @since             1.3.7
    1313 * @package           responsive-accordion-tabs
    1414 *
     
    1717 * Plugin URI:       
    1818 * Description:       Add tabs to your website that convert to accordions on smaller screens
    19  * Version:           1.3.6
     19 * Version:           1.3.7
    2020 * Author:            Richard Holmes
    2121 * Author URI:        https://ampersandstudio.uk/
     
    102102);
    103103define( 'RATABS_PLUGIN_FILE', __FILE__ );
    104 define( 'RESPONSIVE_ACCORDION_TABS_PLUGIN_VERSION', '1.3.6' );
     104define( 'RESPONSIVE_ACCORDION_TABS_PLUGIN_VERSION', '1.3.7' );
    105105// Define the main autoloader
    106106spl_autoload_register( 'responsive_accordion_tabs_autoloader' );
Note: See TracChangeset for help on using the changeset viewer.