(isset($a['title'])? esc_attr($a['title']): 'Show more'), 'swaptitle' => (isset($a['swaptitle'])? esc_attr($a['swaptitle']): 'Show less'), 'class' => '', 'icon' => (isset($a['icon'])? esc_attr($a['icon']): '⮝'), 'swapicon' => (isset($a['swapicon'])? esc_attr($a['swapicon']): '⮝'), 'pos'=> (isset($c) && $c)? 1: 0, 'ht' => $b['height'] ?? '1px', 'hf' => $b['fdheight'] ?? '1px' ), $atts ); //creator_debug_log('ATTS', $atts); $out = ""; if ( isset($options['switches']['enabled']) && $options['switches']['enabled'] ){ $ht = claps_validate_height_value($atts['ht']) ? $atts['ht'] : '1px'; $hf = claps_validate_height_value($atts['hf']) ? $atts['hf'] : '1px'; $above = in_array(strtolower($atts['pos']), [1, 'top', 'above'])? 1: 0; if (!is_null($content) && strlen($content)>0){ $clean_content = trim($content); $clean_content = shortcode_unautop($clean_content); $clean_content = preg_replace('#^(?:

|)+|(?:

|)+$#i', '', $clean_content); $parsed_content = wp_kses_post(do_shortcode($clean_content)); $out .= '
'; $out .= '
'; $out .= $parsed_content; $out .= '
'; $out .= '
'; } } else { $out .= '
'.wp_kses_post(do_shortcode($content)).'
'; } return $out; } add_shortcode('expand', 'claps_main'); add_shortcode('magic_expand', 'claps_main');