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/frenchy/refonte2023/wordpress/wp-content/plugins/ova-sev/inc/class-customize.php
<?php

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

	class Ova_Sev_Customize {

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

		public function ova_sev_customize_register($wp_customize) {

			$this->ova_sev_init( $wp_customize );

			do_action( 'ova_sev_customize_register', $wp_customize );
		}


		public function ova_sev_init( $wp_customize ){

			$wp_customize->add_panel( 'ova_sev_panel', array(
			  'title' => __( 'Service' ),
			  'priority' => 5,
			) );

			$wp_customize->add_section( 'ova_sev_archive_section' , array(
				'title'      => esc_html__( 'Archive', 'ova-sev' ),
				'priority'   => 1,
				'panel' => 'ova_sev_panel',
			) );

			$wp_customize->add_section( 'ova_sev_single_section' , array(
				'title'      => esc_html__( 'Single', 'ova-sev' ),
				'priority'   => 2,
				'panel' => 'ova_sev_panel',
			) );


			$wp_customize->add_setting( 'ova_sev_total_record', array(
				  'type' => 'theme_mod', // or 'option'
				  'capability' => 'edit_theme_options',
				  'theme_supports' => '', // Rarely needed.
				  'default' => '9',
				  'transport' => 'refresh', // or postMessage
				  'sanitize_callback' => 'sanitize_text_field' // Get function name 
				  
				) );
			$wp_customize->add_control('ova_sev_total_record', array(
				'label' => esc_html__('Number of posts per page','ova-sev'),
				'section' => 'ova_sev_archive_section',
				'settings' => 'ova_sev_total_record',
				'type' =>'number'
			));

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

			$wp_customize->add_control('ova_sev_orderby', array(
				'label' 	=> esc_html__('Order By','ova-sev'),
				'section' 	=> 'ova_sev_archive_section',
				'settings' 	=> 'ova_sev_orderby',
				'type' 		=>'select',
				'choices' 	=> array(
					'ova_sev_met_order_sev' 	=> esc_html__( 'Sort Order', 'ova-sev' ),
					'ID' 						=> esc_html__( 'ID', 'ova-sev' ),
					'title' 					=> esc_html__( 'Title', 'ova-sev' ),
					'date' 						=> esc_html__( 'Date', 'ova-sev' ),
					'rand' 						=> esc_html__( 'Random', 'ova-sev' ),
				)
			));

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

			$wp_customize->add_control('ova_sev_order', array(
				'label' 	=> esc_html__('Order','ova-sev'),
				'section' 	=> 'ova_sev_archive_section',
				'settings' 	=> 'ova_sev_order',
				'type' 		=>'select',
				'choices' 	=> array(
					'ASC' 	=> esc_html__( 'Ascending', 'ova-sev' ),
					'DESC' 	=> esc_html__( 'Descending', 'ova-sev' ),
				)
			));

			$wp_customize->add_setting( 'ova_sev_layout', array(
				  'type' => 'theme_mod', // or 'option'
				  'capability' => 'edit_theme_options',
				  'theme_supports' => '', // Rarely needed.
				  'default' => 'three_columns',
				  'transport' => 'refresh', // or postMessage
				  'sanitize_callback' => 'sanitize_text_field' // Get function name 
				  
				) );
			$wp_customize->add_control('ova_sev_layout', array(
				'label' => esc_html__('Layout','ova-sev'),
				'section' => 'ova_sev_archive_section',
				'settings' => 'ova_sev_layout',
				'type' =>'select',
				'choices' => array(
					'two_columns' 		=> __( '2 column', 'ova-sev' ),
					'three_columns' 	=> __( '3 column', 'ova-sev' ),
					'four_columns' 		=> __( '4 column', 'ova-sev' ),
				)
			));

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

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

			$wp_customize->add_setting( 'ova_sev_comments', 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_sev_comments', array(
				'label' => esc_html__('Show Comments','ova-sev'),
				'section' => 'ova_sev_single_section',
				'settings' => 'ova_sev_comments',
				'type' =>'select',
				'choices' => array(
					'yes'	=> __( 'Yes', 'ova-sev' ),
					'no'	=> __( 'No', 'ova-sev' ),
				)
			));
			
			$wp_customize->add_setting( 'header_archive_sev', 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_sev', array(
				'label' => esc_html__('Header','ova-sev'),
				'section' => 'ova_sev_archive_section',
				'settings' => 'header_archive_sev',
				'type' =>'select',
				'choices' => apply_filters('gimont_list_header', '')
			));

			$wp_customize->add_setting( 'archive_footer_sev', 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_sev', array(
				'label' => esc_html__('Footer','ova-dep'),
				'section' => 'ova_sev_archive_section',
				'settings' => 'archive_footer_sev',
				'type' =>'select',
				'choices' => apply_filters('gimont_list_footer', '')
			));

			$wp_customize->add_setting( 'header_single_sev', 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_sev', array(
				'label' => esc_html__('Header','ova-sev'),
				'section' => 'ova_sev_single_section',
				'settings' => 'header_single_sev',
				'type' =>'select',
				'choices' => apply_filters('gimont_list_header', '')
			));


			$wp_customize->add_setting( 'single_footer_sev', 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_sev', array(
				'label' => esc_html__('Footer','ova-dep'),
				'section' => 'ova_sev_single_section',
				'settings' => 'single_footer_sev',
				'type' =>'select',
				'choices' => apply_filters('gimont_list_footer', '')
			));

		}

	}

}

new Ova_Sev_Customize();