HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux sa-dev.otherchirps.net 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64
User: www-data (33)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wp-content/themes/kalium/vc_templates/lab_button.php
<?php
/**
 *	Laborator Button
 *	
 *	Laborator.co
 *	www.laborator.co 
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Direct access not allowed.
}

global $lab_button_ids;

// Atts
if ( function_exists( 'vc_map_get_attributes' ) ) {
	$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
}

extract( $atts );

if ( ! isset( $lab_button_ids ) || ! $lab_button_ids ) {
	$lab_button_ids = 0;
}

$lab_button_ids++;
$btn_index = "btn-index-{$lab_button_ids}";

// Link
$link = vc_build_link($link);

// Element Class
$class = $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts );

$css_class = "laborator-btn btn {$btn_index} btn-type-{$type} {$css_class}";

if ( $type == 'outlined-bg' || $type == 'fliphover' ) {
	$css_class .= ' btn-type-outlined';
}

if ( $button_bg != 'custom' ) {
	$css_class .= " {$button_bg}";
}

$css_class .= " {$size}";

// Custom Button Color
if ( $button_bg == 'custom') {
	switch ( $type ) {	
		case 'outlined' :
		case 'outlined-bg' :
		
			if ( $button_bg_custom ) {
				kalium_append_custom_css( ".{$btn_index}", "border-color: {$button_bg_custom} !important;" );
				
				if ( $type == 'outlined-bg' ) {
					kalium_append_custom_css( ".{$btn_index}:hover", "background: {$button_bg_custom} !important;" );
				}
			}
		
			if ( $button_txt_custom ) {
				kalium_append_custom_css( ".{$btn_index}", "color: {$button_txt_custom} !important;" );
			}
			
			if ( $button_txt_hover_custom ) {
				kalium_append_custom_css( ".{$btn_index}:hover", "color: {$button_txt_hover_custom} !important;" );
				kalium_append_custom_css( ".{$btn_index}:hover", "border-color: {$button_txt_hover_custom} !important;" ); // May not be appropriate
			}
			break;
			
		case "fliphover":
			if ( $button_bg_custom ) {
				kalium_append_custom_css( ".{$btn_index}", "border-color: {$button_bg_custom} !important;" );
				kalium_append_custom_css( ".{$btn_index}:hover:before", "background-color: {$button_bg_custom} !important;" );
			}
			
			if ( $button_txt_custom ) {
				kalium_append_custom_css( ".{$btn_index}", "color: {$button_txt_custom} !important;" );
			}
			
			if ( $button_txt_hover_custom ) {
				kalium_append_custom_css( ".{$btn_index}:hover", "color: {$button_txt_hover_custom} !important;" );
			}
			break;
		
		default:
		
			if ( $button_bg_custom ) {
				kalium_append_custom_css( ".{$btn_index}", "background: {$button_bg_custom} !important;" );
			}
			
			if ( $button_txt_custom ) {
				kalium_append_custom_css( ".{$btn_index}", "color: {$button_txt_custom} !important;" );
			}
			
			if ( $button_txt_hover_custom ) {
				kalium_append_custom_css( ".{$btn_index}:hover", "color: {$button_txt_hover_custom} !important;" );
			}
	}
}

?>
<a href="<?php echo esc_url( $link['url'] ); ?>" title="<?php echo esc_attr( $link['title'] ); ?>" target="<?php echo esc_attr( $link['target'] ); ?>" class="<?php echo esc_attr( $css_class ) . vc_shortcode_custom_css_class($css, ' '); ?>"><?php echo wp_kses_post( $title ); ?></a>