HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/f/r/e/frenchy/refonte2023/wordpress/wp-content/plugins/ova-dep/inc/class-customize.php
<?php

if (!defined( 'ABSPATH' )) {
	exit;
}
if (!class_exists( 'Ova_Dep_Customize' )){

	class Ova_Dep_Customize {

		public function __construct() {
			add_action( 'customize_register', array( $this, 'ova_dep_customize_register' ) );
		}

		public function ova_dep_customize_register($wp_customize) {

			$this->ova_dep_init( $wp_customize );

			do_action( 'ova_dep_customize_register', $wp_customize );
		}


		/* Team */
		public function ova_dep_init( $wp_customize ){

			$wp_customize->add_panel( 'ova_dep_section' , array(
				'title'      => esc_html__( 'Department', 'ova-dep' ),
				'priority'   => 5,
			) );

			$wp_customize->add_section( 'ova_dep_archive_section' , array(
				'title'      => esc_html__( 'Archive', 'ova-dep' ),
				'priority'   => 30,
				'panel' => 'ova_dep_section',
			) );

			$wp_customize->add_section( 'ova_dep_single_section' , array(
				'title'      => esc_html__( 'Single', 'ova-dep' ),
				'priority'   => 30,
				'panel' => 'ova_dep_section',
			) );


			$wp_customize->add_setting( 'ova_dep_total_record', array(
				'type' => 'theme_mod', // or 'option'
				'capability' => 'edit_theme_options',
				'theme_supports' => '', // Rarely needed.
				'default' => 8,
				'transport' => 'refresh', // or postMessage
				'sanitize_callback' => 'sanitize_text_field' // Get function name 
			) );

			$wp_customize->add_control('ova_dep_total_record', array(
				'label' => esc_html__('Number of posts per page','ova-dep'),
				'section' => 'ova_dep_archive_section',
				'settings' => 'ova_dep_total_record',
				'type' =>'number'
			));

			$wp_customize->add_setting( 'ova_dep_archive_template', array(
				  'type' => 'theme_mod', // or 'option'
				  'capability' => 'edit_theme_options',
				  'theme_supports' => '', // Rarely needed.
				  'default' => 'template1',
				  'transport' => 'refresh', // or postMessage
				  'sanitize_callback' => 'sanitize_text_field' // Get function name  
			) );

			$wp_customize->add_control('ova_dep_archive_template', array(
				'label' => esc_html__('Template','ova-dep'),
				'section' => 'ova_dep_archive_section',
				'settings' => 'ova_dep_archive_template',
				'type' =>'select',
				'choices' => array(
					'template1'   => esc_html__( 'Template1', 'ova-dep' ),
					'template2'   => esc_html__( 'Template2', 'ova-dep' ),
				)
			));

			$wp_customize->add_setting( 'ova_dep_orderby', array(
				  'type' 				=> 'theme_mod', // or 'option'
				  'capability' 			=> 'edit_theme_options',
				  'theme_supports' 		=> '', // Rarely needed.
				  'default' 			=> 'sort_order',
				  'transport' 			=> 'refresh', // or postMessage
				  'sanitize_callback' 	=> 'sanitize_text_field' // Get function name  
			) );

			$wp_customize->add_control('ova_dep_orderby', array(
				'label' 	=> esc_html__('Orderby','ova-dep'),
				'section' 	=> 'ova_dep_archive_section',
				'settings' 	=> 'ova_dep_orderby',
				'type' 		=>'select',
				'choices' 	=> array(
					'sort_order' 	=> esc_html__( 'Sort Order', 'ova-por' ),
					'ID' 			=> esc_html__( 'ID', 'ova-por' ),
					'title' 		=> esc_html__( 'Title', 'ova-por' ),
					'date' 			=> esc_html__( 'Date', 'ova-por' ),
					'rand' 			=> esc_html__( 'Random', 'ova-por' ),
				)
			));

			$wp_customize->add_setting( 'ova_dep_order', array(
				  'type' 				=> 'theme_mod', // or 'option'
				  'capability' 			=> 'edit_theme_options',
				  'theme_supports' 		=> '', // Rarely needed.
				  'default' 			=> 'ASC',
				  'transport' 			=> 'refresh', // or postMessage
				  'sanitize_callback' 	=> 'sanitize_text_field' // Get function name 
			) );

			$wp_customize->add_control('ova_dep_order', array(
				'label' 	=> esc_html__('Order','ova-dep'),
				'section' 	=> 'ova_dep_archive_section',
				'settings' 	=> 'ova_dep_order',
				'type' 		=>'select',
				'choices' 	=> array(
					'ASC' 	=> esc_html__( 'Ascending', 'ova-por' ),
					'DESC' 	=> esc_html__( 'Descending', 'ova-por' ),
				)
			));

			$wp_customize->add_setting( 'ova_dep_layout', array(
				  'type' => 'theme_mod', // or 'option'
				  'capability' => 'edit_theme_options',
				  'theme_supports' => '', // Rarely needed.
				  'default' => 'four_column',
				  'transport' => 'refresh', // or postMessage
				  'sanitize_callback' => 'sanitize_text_field' // Get function name  
			) );

			$wp_customize->add_control('ova_dep_layout', array(
				'label' => esc_html__('Layout','ova-dep'),
				'section' => 'ova_dep_archive_section',
				'settings' => 'ova_dep_layout',
				'type' =>'select',
				'choices' => array(
					'two_column'    => esc_html__( '2 column', 'ova-dep' ),
					'three_column' => esc_html__( '3 column', 'ova-dep' ),
					'four_column'  => esc_html__( '4 column', 'ova-dep' ),
				)
			));

			$wp_customize->add_setting( 'ova_dep_archive_search', array(
				  'type' => 'theme_mod', // or 'option'
				  'capability' => 'edit_theme_options',
				  'theme_supports' => '', // Rarely needed.
				  'default' => 'yes',
				  'transport' => 'refresh', // or postMessage
				  'sanitize_callback' => 'sanitize_text_field' // Get function name  
			) );

			$wp_customize->add_control('ova_dep_archive_search', array(
				'label' => esc_html__('Show Search','ova-dep'),
				'section' => 'ova_dep_archive_section',
				'settings' => 'ova_dep_archive_search',
				'type' =>'select',
				'choices' => array(
					'yes'   => esc_html__( 'Yes', 'ova-dep' ),
					'no'    => esc_html__( 'No', 'ova-dep' ),
				)
			));

			$wp_customize->add_setting( 'ova_dep_archive_sidebar', array(
				  'type' => 'theme_mod', // or 'option'
				  'capability' => 'edit_theme_options',
				  'theme_supports' => '', // Rarely needed.
				  'default' => 'right_sidebar',
				  'transport' => 'refresh', // or postMessage
				  'sanitize_callback' => 'sanitize_text_field' // Get function name  
			) );

			$wp_customize->add_control('ova_dep_archive_sidebar', array(
				'label' => esc_html__('Sidebar','ova-dep'),
				'section' => 'ova_dep_archive_section',
				'settings' => 'ova_dep_archive_sidebar',
				'type' =>'select',
				'choices' => array(
					'right_sidebar'   => esc_html__( 'Right Sidebar', 'ova-dep' ),
					'left_sidebar'    => esc_html__( 'Left Sidebar', 'ova-dep' ),
					'no_sidebar'      => esc_html__( 'No Sidebar', 'ova-dep' ),
				)
			));

			$wp_customize->add_setting( 'header_archive_dep', array(
			  	'type' => 'theme_mod', // or 'option'
			  	'capability' => 'edit_theme_options',
			  	'theme_supports' => '', // Rarely needed.
			  	'default' => 'default',
			  	'transport' => 'refresh', // or postMessage
			  	'sanitize_callback' => 'sanitize_text_field' // Get function name 
			) );

			$wp_customize->add_control('header_archive_dep', array(
				'label' => esc_html__('Header Archive','ova-dep'),
				'section' => 'ova_dep_archive_section',
				'settings' => 'header_archive_dep',
				'type' =>'select',
				'choices' => apply_filters('gimont_list_header', '')
			));
			

			$wp_customize->add_setting( 'archive_footer_dep', array(
			  'type' => 'theme_mod', // or 'option'
			  'capability' => 'edit_theme_options',
			  'theme_supports' => '', // Rarely needed.
			  'default' => 'default',
			  'transport' => 'refresh', // or postMessage
			  'sanitize_callback' => 'sanitize_text_field' // Get function name 
			  
			) );
			$wp_customize->add_control('archive_footer_dep', array(
				'label' => esc_html__('Footer Archive','ova-dep'),
				'section' => 'ova_dep_archive_section',
				'settings' => 'archive_footer_dep',
				'type' =>'select',
				'choices' => apply_filters('gimont_list_footer', '')
			));

			$wp_customize->add_setting( 'ova_dep_single_sidebar', array(
				'type' => 'theme_mod', // or 'option'
				'capability' => 'edit_theme_options',
				'theme_supports' => '', // Rarely needed.
				'default' => 'right_sidebar',
				'transport' => 'refresh', // or postMessage
				'sanitize_callback' => 'sanitize_text_field' // Get function name 
			) );

			$wp_customize->add_control('ova_dep_single_sidebar', array(
				'label' => esc_html__('Sidebar','ova-dep'),
				'section' => 'ova_dep_single_section',
				'settings' => 'ova_dep_single_sidebar',
				'type' =>'select',
				'choices' => array(
					'right_sidebar'   => esc_html__( 'Right Sidebar', 'ova-dep' ),
					'left_sidebar'    => esc_html__( 'Left Sidebar', 'ova-dep' ),
					'no_sidebar'      => esc_html__( 'No Sidebar', 'ova-dep' ),
				)
			));

			$wp_customize->add_setting( 'header_single_dep', array(
			  	'type' => 'theme_mod', // or 'option'
			  	'capability' => 'edit_theme_options',
			  	'theme_supports' => '', // Rarely needed.
			  	'default' => 'default',
			  	'transport' => 'refresh', // or postMessage
			  	'sanitize_callback' => 'sanitize_text_field' // Get function name 
			) );

			$wp_customize->add_control('header_single_dep', array(
				'label' => esc_html__('Header Single','ova-dep'),
				'section' => 'ova_dep_single_section',
				'settings' => 'header_single_dep',
				'type' =>'select',
				'choices' => apply_filters('gimont_list_header', '')
			));

			$wp_customize->add_setting( 'single_footer_dep', array(
			  	'type' => 'theme_mod', // or 'option'
			  	'capability' => 'edit_theme_options',
			  	'theme_supports' => '', // Rarely needed.
			  	'default' => 'default',
			  	'transport' => 'refresh', // or postMessage
			  	'sanitize_callback' => 'sanitize_text_field' // Get function name 
			) );

			$wp_customize->add_control('single_footer_dep', array(
				'label' => esc_html__('Footer Single','ova-dep'),
				'section' => 'ova_dep_single_section',
				'settings' => 'single_footer_dep',
				'type' =>'select',
				'choices' => apply_filters('gimont_list_footer', '')
			));

		}

	}

}

new Ova_Dep_Customize();