HEX
Server: Apache
System: Linux web15f74.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: lucendi (859622)
PHP: 7.4.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,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/lucendi/www/wp-content/themes/mesmerize/customizer/kirki/includes/class-kirki-section.php
<?php
/**
 * Handles sections created via the Kirki API.
 *
 * @package     Kirki
 * @category    Core
 * @author      Aristeides Stathopoulos
 * @copyright   Copyright (c) 2016, Aristeides Stathopoulos
 * @license     http://opensource.org/licenses/https://opensource.org/licenses/MIT
 * @since       1.0
 */

if ( ! class_exists( 'Kirki_Section' ) ) {

	/**
	 * Each section is a separate instrance of the Kirki_Section object.
	 */
	class Kirki_Section {

		/**
		 * An array of our section types.
		 *
		 * @access private
		 * @var array
		 */
		private $section_types = array(
			'kirki-default'  => 'Kirki_Sections_Default_Section',
			'kirki-expanded' => 'Kirki_Sections_Expanded_Section',
			'kirki-hover'    => 'Kirki_Sections_Hover_Section',
		);

		/**
		 * The object constructor.
		 *
		 * @access public
		 * @param array $args The section parameters.
		 */
		public function __construct( $args ) {

			$this->section_types = apply_filters( 'kirki/section_types', $this->section_types );
			$this->add_section( $args );

		}

		/**
		 * Adds the section using the WordPress Customizer API.
		 *
		 * @access public
		 * @param array $args The section parameters.
		 */
		public function add_section( $args ) {

			global $wp_customize;

			if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->section_types ) ) {
				$args['type'] = 'kirki-default';
			}
			$section_classname = $this->section_types[ $args['type'] ];

			if ( isset( $args['icon'] ) && ! empty( $args['icon'] ) ) {
				$args['title'] = '<span class="dashicons ' . esc_attr( $args['icon'] ) . '"></span> ' . esc_html( $args['title'] );
			}

			// Add the section.
			$wp_customize->add_section( new $section_classname( $wp_customize, sanitize_key( $args['id'] ), $args ) );

		}
	}
}