Visual Composer手风琴(WordPress)无法正常工作

时间:2016-05-19 13:53:54

标签: php wordpress visual-composer

手风琴在手机屏幕上无法正常工作。

  1. 有时无法打开标签。
  2. 您无法关闭已打开的标签。
  3. 如果您打开另一个标签页,则不会跳转到新打开的标签页的开头。
  4. 这是WordPress网站:http://neuronade.com

    这是背后的代码(我猜):

    vc_accordions.php

    <?php
    $title = $interval = $el_class = $output = '';
    
    extract( shortcode_atts( array(
    	'title' 				=> '',
    	'heading_title' 		=> '',
    	'interval' 				=> 0,
    	'style' 				=> 'fancy-style',
    	'container_bg_color' 	=> '#fff',
    	'el_position' 			=> '',
    	'open_toggle' 			=> 0,
    	'responsive' 			=> 'true',
    	'action_style' 			=> 'accordion-style',
    	'el_class' 				=> ''
    ), $atts ) );
    
    
    $id = uniqid();
    
    // The logic is inverted in options to whatever we have in code so tweak it as this
    // to get to right output without breaking potentially right code.
    // Current state output classes that mean:
    // mobile-true - the shortcode is disabled for mobile and all panes are expanded
    // mobile-false - the shortcode is enabled, panesare toggled and clickable to change its state
    $responsive = ($responsive == 'true') ? 'false' : 'true';
    
    if ( !empty( $heading_title ) ) {
    	$output .= '<h3 class="mk-shortcode mk-fancy-title pattern-style mk-shortcode-heading"><span>'.$heading_title.'</span></h3>';
    }
    $output .= '<div data-style="'.$action_style.'" data-initialIndex="'.$open_toggle.'" id="mk-accordion-'.$id.'" class="mk-accordion mk-shortcode mobile-'.$responsive.' '.$style.' '.$el_class.'">';
    $output .= wpb_js_remove_wpautop($content);
    $output .= '</div>';
    
    
    // Get global JSON contructor object for styles and create local variable
    global $app_dynamic_styles;
    $container_bg_color = !empty($container_bg_color) ? ('background-color:'.$container_bg_color.';') : '';
    $app_styles = '
     #mk-accordion-'.$id.' .mk-accordion-pane{
        '.$container_bg_color.'
    }';
    
    
    echo $output;
    
    
    // Hidden styles node for head injection after page load through ajax
    echo '<div id="ajax-'.$id.'" class="mk-dynamic-styles">';
    echo '<!-- ' . mk_clean_dynamic_styles($app_styles) . '-->';
    echo '</div>';
    
    
    // Export styles to json for faster page load
    $app_dynamic_styles[] = array(
      'id' => 'ajax-'.$id ,
      'inject' => $app_styles
    );

    vc_accordion_tab.php

    <?php
    extract( shortcode_atts( array(
    	'title' => __( "Section", "mk_framework" ),
    	'icon' 	=> '',
    ), $atts ) );
    
    $output = '';
    if(!empty( $icon )) {
        $icon = (strpos($icon, 'mk-') !== FALSE) ? ( '<i class="'.$icon.'"></i>' ) : ( '<i class="mk-'.$icon.'"></i>' );    
    } else {
    	$icon = '';
    }
    $output .= "\n\t\t\t\t" . '<div class="mk-accordion-single"><div class="mk-accordion-tab">'.$icon.'<span>'.$title.'</span></div>';
    $output .= "\n\t\t\t\t" . '<div class="mk-accordion-pane">';
    $output .= ($content=='' || $content==' ') ? __("Empty section. Edit page to add content here.", 'mk_framework') : "\n\t\t\t\t" . wpb_js_remove_wpautop($content, true);
    $output .= "\n\t\t\t\t" . '<div class="clearboth"></div></div></div>';
    
    echo $output;

0 个答案:

没有答案