Uname: Linux premium72.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.2.29 [ PHP INFO ] PHP os: Linux
Server Ip: 198.54.125.95
Your Ip: 216.73.216.112
User: matican (532) | Group: matican (531)
Safe Mode: OFF
Disable Function:
NONE

name : dropdown-tab.php
<?php
	/*	
	*	Goodlayers Item
	*/
	
	// [gdlr_core_dropdown_tab]
	// [gdlr_core_tab title="" ]
	// [/gdlr_core_dropdown_tab]
	add_shortcode('gdlr_core_dropdown_tab', 'gdlr_core_dropdown_tab_shortcode');
	if( !function_exists('gdlr_core_dropdown_tab_shortcode') ){
		function gdlr_core_dropdown_tab_shortcode($atts, $content = ''){
			$atts = shortcode_atts(array(), $atts, 'gdlr_core_dropdown_tab');
			
			$ret  = apply_filters('gdlr_core_dropdown_tab_content', $atts, $content);
			if( !empty($ret) ){ return $ret; }

			global $gdlr_core_tabs;
			$gdlr_core_tabs = array();

			do_shortcode($content);

			$active_tab = 0;

			$ret  = '<div class="gdlr-core-dropdown-tab gdlr-core-js clearfix" >';
			$ret .= '<div class="gdlr-core-dropdown-tab-title" >';
			$ret .= '<span class="gdlr-core-head">' . $gdlr_core_tabs[$active_tab]['title'] . '</span>';
			
			$count = 0;
			$ret .= '<div class="gdlr-core-dropdown-tab-head-wrap" >';
			foreach( $gdlr_core_tabs as $gdlr_core_tab ){
				$ret .= '<div class="gdlr-core-dropdown-tab-head ' . (($count == $active_tab)? 'gdlr-core-active': '') . '" data-index="' . esc_attr($count) . '" >' . $gdlr_core_tab['title'] . '</div>';

				$count ++;
			}
			$ret .= '</div>'; // gdlr-core-dropdown-tab-head-wrap
			$ret .= '</div>'; // gdlr-core-dropdown-tab-title

			$count = 0;
			$ret .= '<div class="gdlr-core-dropdown-tab-content-wrap" >';
			foreach( $gdlr_core_tabs as $gdlr_core_tab ){
				$ret .= '<div class="gdlr-core-dropdown-tab-content ' . (($count == $active_tab)? 'gdlr-core-active': '') . '" data-index="' . esc_attr($count) . '" >' . $gdlr_core_tab['content'] . '</div>';

				$count ++;
			}
			$ret .= '</div>';
			$ret .= '</div>'; // gdlr-core-dropdown-tab

			return $ret;
		}
	}
© 2025 XylotrechusZ