File: /home/confeduphaar/public_html/wp-content/plugins/ova-team/inc/class-customize.php
<?php
if (!defined( 'ABSPATH' )) {
exit;
}
if (!class_exists( 'Ova_Tema_Customize' )){
class Ova_Tema_Customize {
public function __construct() {
add_action( 'customize_register', array( $this, 'ova_team_customize_register' ) );
}
public function ova_team_customize_register($wp_customize) {
$this->ova_team_init( $wp_customize );
do_action( 'ova_team_customize_register', $wp_customize );
}
/* Team */
public function ova_team_init( $wp_customize ){
$wp_customize->add_section( 'ova_team_section' , array(
'title' => esc_html__( 'Team', 'ova-team' ),
'priority' => 5,
) );
$wp_customize->add_setting( 'ova_team_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_team_total_record', array(
'label' => esc_html__('Number of posts per page','ova-team'),
'section' => 'ova_team_section',
'settings' => 'ova_team_total_record',
'type' =>'number'
));
$wp_customize->add_setting( 'ova_team_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_team_orderby', array(
'label' => esc_html__('Orderby','ova-team'),
'section' => 'ova_team_section',
'settings' => 'ova_team_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_team_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_team_order', array(
'label' => esc_html__('Order','ova-team'),
'section' => 'ova_team_section',
'settings' => 'ova_team_order',
'type' =>'select',
'choices' => array(
'ASC' => esc_html__( 'Ascending', 'ova-por' ),
'DESC' => esc_html__( 'Descending', 'ova-por' ),
)
));
$wp_customize->add_setting( 'ova_team_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_team_layout', array(
'label' => esc_html__('Layout','ova-team'),
'section' => 'ova_team_section',
'settings' => 'ova_team_layout',
'type' =>'select',
'choices' => array(
'two_column' => __( '2 column', 'ova-team' ),
'three_column' => __( '3 column', 'ova-team' ),
'four_column' => __( '4 column', 'ova-team' ),
)
));
$wp_customize->add_setting( 'archive_background_team', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'archive_background_team', array(
'label' => esc_html__('Background Archive Team', 'ova-team'),
'section' => 'ova_team_section',
'settings' => 'archive_background_team',
)));
$wp_customize->add_setting( 'single_background_team', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'single_background_team', array(
'label' => esc_html__('Background Single Team', 'ova-team'),
'section' => 'ova_team_section',
'settings' => 'single_background_team',
)));
$wp_customize->add_setting( 'header_archive_team', 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_team', array(
'label' => esc_html__('Header Archive','ova-team'),
'section' => 'ova_team_section',
'settings' => 'header_archive_team',
'type' =>'select',
'choices' => apply_filters('egovt_list_header', '')
));
$wp_customize->add_setting( 'archive_footer_team', 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_team', array(
'label' => esc_html__('Footer Archive','ova-dep'),
'section' => 'ova_team_section',
'settings' => 'archive_footer_team',
'type' =>'select',
'choices' => apply_filters('egovt_list_footer', '')
));
$wp_customize->add_setting( 'header_single_team', 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_team', array(
'label' => esc_html__('Header Single','ova-team'),
'section' => 'ova_team_section',
'settings' => 'header_single_team',
'type' =>'select',
'choices' => apply_filters('egovt_list_header', '')
));
$wp_customize->add_setting( 'single_footer_team', 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_team', array(
'label' => esc_html__('Footer Single','ova-dep'),
'section' => 'ova_team_section',
'settings' => 'single_footer_team',
'type' =>'select',
'choices' => apply_filters('egovt_list_footer', '')
));
}
}
}
new Ova_Tema_Customize();