HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/wp-content/themes/chocorocco/plugins/elegro-payment/elegro-payment.php
<?php
/* elegro Crypto Payment support functions
------------------------------------------------------------------------------- */
// Theme init priorities:
// 9 - register other filters (for installer, etc.)
if ( ! function_exists( 'chocorocco_elegro_payment_theme_setup9' ) ) {
	add_action( 'after_setup_theme', 'chocorocco_elegro_payment_theme_setup9', 9 );
	function chocorocco_elegro_payment_theme_setup9() {
		if ( chocorocco_exists_elegro_payment() ) {
            add_action('wp_enqueue_scripts', 'chocorocco_elegro_payment_frontend_scripts', 1100);
			add_filter( 'chocorocco_filter_merge_styles', 'chocorocco_elegro_payment_merge_styles' );
		}
		if ( is_admin() ) {
			add_filter( 'chocorocco_filter_tgmpa_required_plugins', 'chocorocco_elegro_payment_tgmpa_required_plugins' );
		}
	}
}

// Filter to add in the required plugins list
if ( ! function_exists( 'chocorocco_elegro_payment_tgmpa_required_plugins' ) ) {
	function chocorocco_elegro_payment_tgmpa_required_plugins( $list = array() ) {
            if (in_array('elegro-payment', chocorocco_storage_get('required_plugins'))) {
			$list[] = array(
                'name' 		=> esc_html__('elegro Crypto Payment', 'chocorocco'),
				'slug'     => 'elegro-payment',
				'required' => false,
			);
		}
		return $list;
	}
}

// Check if this plugin installed and activated
if ( ! function_exists( 'chocorocco_exists_elegro_payment' ) ) {
	function chocorocco_exists_elegro_payment() {
		return class_exists( 'WC_Elegro_Payment' );
	}
}

// Merge custom styles
if ( ! function_exists( 'chocorocco_elegro_payment_merge_styles' ) ) {
	function chocorocco_elegro_payment_merge_styles( $list ) {
		$list[] = 'plugins/elegro-payment/elegro-payment.css';
		return $list;
	}
}
// Enqueue custom styles
if (!function_exists('chocorocco_elegro_payment_frontend_scripts')) {
    function chocorocco_elegro_payment_frontend_scripts()
    {
        if (chocorocco_exists_elegro_payment()) {
            if (chocorocco_is_on(chocorocco_get_theme_option('debug_mode')) && chocorocco_get_file_dir('plugins/elegro-payment/elegro-payment.css') != '')
                wp_enqueue_style('chocorocco-elegro-payment', chocorocco_get_file_url('plugins/elegro-payment/elegro-payment.css'), array(), null);
        }
    }
}