Changeset 2843496
- Timestamp:
- 01/04/2023 02:59:35 PM (3 years ago)
- Location:
- responsive-accordion-tabs/trunk
- Files:
-
- 6 edited
-
assets/js/a11y-accordion-tabs.js (modified) (2 diffs)
-
includes/admin/class-posts.php (modified) (4 diffs)
-
includes/admin/class-settings.php (modified) (2 diffs)
-
includes/frontend/class-shortcodes.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
responsive-accordion-tabs.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
responsive-accordion-tabs/trunk/assets/js/a11y-accordion-tabs.js
r2831013 r2843496 29 29 options 30 30 ); 31 31 32 32 if (el.getAttribute('data-tabs-allowed') == 'true') { 33 33 this.options.tabsAllowed = true; … … 46 46 el.getAttribute('data-selected-tab') 47 47 ); 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; 48 54 } 49 55 -
responsive-accordion-tabs/trunk/includes/admin/class-posts.php
r2831047 r2843496 255 255 <label for="accordion-tab-hashvalue">Hash Value:</label> 256 256 <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 ) ; 258 258 ?>" /> 259 259 </p> … … 332 332 <input type='checkbox' name='accordion-tab-hide-description' value='1' <?php 333 333 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> 335 338 </div> 336 339 … … 354 357 } 355 358 ?></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> 356 379 </div> 357 380 <?php … … 412 435 $description = wp_kses_post( $_POST["accordion-tab-hide-description"] ); 413 436 $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"] ); 414 440 $tab_settings = array( 415 441 'theme' => $theme, 416 442 '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 ), 420 446 'hide_title' => $title, 421 447 'hide_description' => $description, -
responsive-accordion-tabs/trunk/includes/admin/class-settings.php
r2744117 r2843496 69 69 <?php 70 70 ?> 71 71 72 </nav> 72 73 … … 75 76 switch ( $tab ) { 76 77 case 'styles': 78 break; 79 case 'export': 80 break; 81 case 'import': 77 82 break; 78 83 default: -
responsive-accordion-tabs/trunk/includes/frontend/class-shortcodes.php
r2834570 r2843496 59 59 <?php } 60 60 if ( !$atts["hide_description"] ) { 61 echo get_the_content( "", false, $atts["id"]);61 echo apply_filters( 'the_content', get_the_content( "", false, $atts["id"] ) ); 62 62 } ?> 63 63 </div> … … 65 65 <?php $tabs_data = get_post_meta( $atts["id"], 'accordion_tab_data', true ); ?> 66 66 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 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' ); ?>"> 68 68 69 69 <?php if ( !empty( $tabs_data ) ) { ?> -
responsive-accordion-tabs/trunk/readme.txt
r2834570 r2843496 9 9 Tested up to: 6.1 10 10 Requires PHP: 7.4 11 Stable tag: 1.3. 612 Version: 1.3. 611 Stable tag: 1.3.7 12 Version: 1.3.7 13 13 License: GPLv3 or later 14 14 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 36 36 37 37 == Changelog == 38 1.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 38 43 1.3.6 39 44 - NEW: Add wrapper div to title and description -
responsive-accordion-tabs/trunk/responsive-accordion-tabs.php
r2834570 r2843496 10 10 * 11 11 * @link 12 * @since 1.3. 612 * @since 1.3.7 13 13 * @package responsive-accordion-tabs 14 14 * … … 17 17 * Plugin URI: 18 18 * Description: Add tabs to your website that convert to accordions on smaller screens 19 * Version: 1.3. 619 * Version: 1.3.7 20 20 * Author: Richard Holmes 21 21 * Author URI: https://ampersandstudio.uk/ … … 102 102 ); 103 103 define( 'RATABS_PLUGIN_FILE', __FILE__ ); 104 define( 'RESPONSIVE_ACCORDION_TABS_PLUGIN_VERSION', '1.3. 6' );104 define( 'RESPONSIVE_ACCORDION_TABS_PLUGIN_VERSION', '1.3.7' ); 105 105 // Define the main autoloader 106 106 spl_autoload_register( 'responsive_accordion_tabs_autoloader' );
Note: See TracChangeset
for help on using the changeset viewer.