OwlCyberSecurity - MANAGER
Edit File: class-customize.php
<?php if (!defined( 'ABSPATH' )) { exit; } if (!class_exists( 'Ova_Sermon_Customize' )){ class Ova_Sermon_Customize { public function __construct() { add_action( 'customize_register', array( $this, 'ova_sermon_customize_register' ) ); } public function ova_sermon_customize_register($wp_customize) { $this->ova_sermon_init( $wp_customize ); do_action( 'ova_sermon_customize_register', $wp_customize ); } /* Sermon */ public function ova_sermon_init( $wp_customize ){ $wp_customize->add_section( 'ova_sermon_section' , array( 'title' => esc_html__( 'Sermon', 'ova-sermon' ), 'priority' => 5, ) ); $wp_customize->add_setting( 'ova_sermon_total_record', array( 'type' => 'theme_mod', // or 'option' 'capability' => 'edit_theme_options', 'theme_supports' => '', // Rarely needed. 'default' => '6', 'transport' => 'refresh', // or postMessage 'sanitize_callback' => 'sanitize_text_field' // Get function name ) ); $wp_customize->add_control('ova_sermon_total_record', array( 'label' => esc_html__('Number of posts per page','ova-sermon'), 'section' => 'ova_sermon_section', 'settings' => 'ova_sermon_total_record', 'type' =>'number' )); $wp_customize->add_setting( 'ova_sermon_layout', array( 'type' => 'theme_mod', // or 'option' 'capability' => 'edit_theme_options', 'theme_supports' => '', // Rarely needed. 'default' => 'three_column', 'transport' => 'refresh', // or postMessage 'sanitize_callback' => 'sanitize_text_field' // Get function name ) ); $wp_customize->add_control('ova_sermon_layout', array( 'label' => esc_html__('Layout','ova-sermon'), 'section' => 'ova_sermon_section', 'settings' => 'ova_sermon_layout', 'type' =>'select', 'choices' => array( 'two_column' => esc_html__( '2 column', 'ova-sermon' ), 'three_column' => esc_html__( '3 column', 'ova-sermon' ), 'four_column' => esc_html__( '4 column', 'ova-sermon' ), ) )); $wp_customize->add_setting( 'header_archive_sermon', 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_sermon', array( 'label' => esc_html__('Header Archive','ova-sermon'), 'section' => 'ova_sermon_section', 'settings' => 'header_archive_sermon', 'type' =>'select', 'choices' => apply_filters('chursy_list_header', '') )); $wp_customize->add_setting( 'archive_footer_sermon', 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_sermon', array( 'label' => esc_html__('Footer Archive','ova-sermon'), 'section' => 'ova_sermon_section', 'settings' => 'archive_footer_sermon', 'type' =>'select', 'choices' => apply_filters('chursy_list_footer', '') )); $wp_customize->add_setting( 'header_single_sermon', 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_sermon', array( 'label' => esc_html__('Header Single','ova-sermon'), 'section' => 'ova_sermon_section', 'settings' => 'header_single_sermon', 'type' =>'select', 'choices' => apply_filters('chursy_list_header', '') )); $wp_customize->add_setting( 'single_footer_sermon', 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_sermon', array( 'label' => esc_html__('Footer Single','ova-sermon'), 'section' => 'ova_sermon_section', 'settings' => 'single_footer_sermon', 'type' =>'select', 'choices' => apply_filters('chursy_list_footer', '') )); } } } new Ova_Sermon_Customize();