HEX
Server: Apache
System: Linux web04.cloudvoor.nl 5.15.0-1089-azure #98~20.04.1-Ubuntu SMP Fri May 2 20:18:39 UTC 2025 x86_64
User: web517 (1027)
PHP: 8.3.21
Disabled: exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,expect_popen,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/clients/client93/web517/web/wp-content/themes/allx/include/categories-templates.php
<?php if( ! defined( 'ABSPATH' ) ) exit;

		function allx_template_select_cat( $input ) {
			$valid = array(
				'' => esc_attr__( 'Default', 'allx' ),
				'temp1' => esc_attr__( 'Template 1', 'allx' ),
				'temp2' => esc_attr__( 'Template 2', 'allx' ),
			);
			
			if ( array_key_exists( $input, $valid ) ) {
				return $input;
				} else {
				return '';
			}
		}

function allx_all_cat_customize_register( $wp_customize ) {

 

	$wp_customize->add_section( 'select_templates_cat' , array(
		'title'       => __( 'Categories Templates', 'allx' ),
		'priority'   => 25,
	) );

	$wp_customize->add_setting( 'cat_temp', array (
		'sanitize_callback' => 'allx_template_select_cat',
		'default' => 'all',
	) );
	
	$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'cat_temp', array(
		'label'    => __( 'Categories Templates', 'allx' ),
		'section'  => 'select_templates_cat',		
		'settings' => 'cat_temp',
		'type'     =>  'select',		
		'choices'  => array(
				'' => esc_attr__( 'Default', 'allx' ),
				'temp1' => esc_attr__( 'Template 1', 'allx' ),
				'temp2' => esc_attr__( 'Template 2', 'allx' ),
		)
	) ) );
}
add_action( 'customize_register', 'allx_all_cat_customize_register' );


function allx_cat_scripts() {
	if( get_theme_mod('cat_temp') == "temp1" or get_theme_mod('cat_temp') == "" ){
		wp_enqueue_style( 'allx-cat-1-css', allx_THEME_URI . 'css/cat-1.css' );
	}

}

add_action( 'wp_enqueue_scripts', 'allx_cat_scripts' );