D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
themes
/
aeen
/
inc
/
customizer
/
settings
/
Filename :
practice.php
back
Copy
<?php /** * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\aeen\Customizer\Settings; use radiustheme\aeen\Customizer\RDTheme_Customizer; use radiustheme\aeen\Customizer\Controls\Customizer_Switch_Control; use radiustheme\aeen\Customizer\Controls\Customizer_Separator_Control; use radiustheme\aeen\Customizer\Controls\Customizer_Image_Radio_Control; use radiustheme\aeen\Customizer\Controls\Customizer_Gallery_Control; use WP_Customize_Media_Control; use WP_Customize_Color_Control; /** * Adds the individual sections, settings, and controls to the theme customizer */ class RDTheme_Practice_Archive_Settings extends RDTheme_Customizer { public function __construct() { parent::instance(); $this->populated_default_data(); // Add Controls add_action( 'customize_register', array( $this, 'register_practice_archive_controls' ) ); } /** * Practice Post Controls */ public function register_practice_archive_controls( $wp_customize ) { $wp_customize->add_setting( 'spractice_page_banner', array( 'default' => $this->defaults['spractice_page_banner'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_switch_sanitization', ) ); $wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'spractice_page_banner', array( 'label' => __( 'Banner', 'aeen' ), 'section' => 'practice_archive_section', ) ) ); // Banner BG Type $wp_customize->add_setting( 'spractice_page_banner_bg_type', array( 'default' => $this->defaults['spractice_page_banner_bg_type'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_radio_sanitization', 'active_callback' => 'rttheme_is_spractice_banner_enabled', ) ); $wp_customize->add_control( 'spractice_page_banner_bg_type', array( 'label' => __( 'Banner Background Type', 'aeen' ), 'section' => 'practice_archive_section', 'description' => esc_html__( 'This is banner background type.', 'aeen' ), 'type' => 'select', 'choices' => array( 'bgimg' => esc_html__( 'BG Image', 'aeen' ), 'bgcolor' => esc_html__( 'BG Color', 'aeen' ), ), 'active_callback' => 'rttheme_is_spractice_banner_enabled', ) ); $wp_customize->add_setting( 'spractice_page_banner_bgimg', array( 'default' => $this->defaults['spractice_page_banner_bgimg'], 'transport' => 'refresh', 'sanitize_callback' => 'absint', 'active_callback' => 'rttheme_spractice_banner_bgimg_type_condition', ) ); $wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'spractice_page_banner_bgimg', array( 'label' => __( 'Banner Background Image', 'aeen' ), 'description' => esc_html__( 'This is the description for the Media Control', 'aeen' ), 'section' => 'practice_archive_section', 'mime_type' => 'image', 'button_labels' => array( 'select' => __( 'Select File', 'aeen' ), 'change' => __( 'Change File', 'aeen' ), 'default' => __( 'Default', 'aeen' ), 'remove' => __( 'Remove', 'aeen' ), 'placeholder' => __( 'No file selected', 'aeen' ), 'frame_title' => __( 'Select File', 'aeen' ), 'frame_button' => __( 'Choose File', 'aeen' ), ), 'active_callback' => 'rttheme_spractice_banner_bgimg_type_condition', ) ) ); // Banner background image overlay $wp_customize->add_setting('spractice_page_banner_bgimage_overlay', array( 'default' => 'rgba(0, 0, 0, 0.5)', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', 'active_callback' => 'rttheme_spractice_banner_bgimg_type_condition', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'spractice_page_banner_bgimage_overlay', array( 'label' => esc_html__('Banner Background Overlay Color', 'aeen'), 'settings' => 'spractice_page_banner_bgimage_overlay', 'priority' => 10, 'section' => 'practice_archive_section', 'active_callback' => 'rttheme_spractice_banner_bgimg_type_condition', ) )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'spractice_page_banner_bgimage_overlay', array( 'label' => esc_html__('Banner Background Overlay Color', 'aeen'), 'settings' => 'spractice_page_banner_bgimage_overlay', 'priority' => 10, 'section' => 'practice_archive_section', 'active_callback' => 'rttheme_spractice_banner_bgimg_type_condition', ) )); // Banner background color opacity $wp_customize->add_setting( 'spractice_page_overlay_opacity', array( 'default' => $this->defaults['spractice_page_overlay_opacity'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_sanitize_integer', 'active_callback' => 'rttheme_spractice_banner_bgimg_type_condition', ) ); $wp_customize->add_control( 'spractice_page_overlay_opacity', array( 'label' => __( 'Overlay Opacity', 'aeen' ), 'section' => 'practice_archive_section', 'type' => 'number', 'active_callback' => 'rttheme_spractice_banner_bgimg_type_condition', ) ); // Banner background color $wp_customize->add_setting('spractice_page_banner_bgcolor', array( 'default' => 'rgba(19, 21, 32, 1)', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', 'active_callback' => 'rttheme_spractice_banner_bgcolor_type_condition', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'spractice_page_banner_bgcolor', array( 'label' => esc_html__('Banner Background Color', 'aeen'), 'settings' => 'spractice_page_banner_bgcolor', 'priority' => 10, 'section' => 'practice_archive_section', 'active_callback' => 'rttheme_spractice_banner_bgcolor_type_condition', ) )); /** * Separator */ $wp_customize->add_setting('separator_spractice_page_breadcrumb', array( 'default' => '', 'sanitize_callback' => 'esc_html', )); $wp_customize->add_control(new Customizer_Separator_Control($wp_customize, 'separator_spractice_page_breadcrumb', array( 'settings' => 'separator_spractice_page_breadcrumb', 'section' => 'practice_archive_section', ))); $wp_customize->add_setting( 'spractice_page_breadcrumb', array( 'default' => $this->defaults['spractice_page_breadcrumb'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_switch_sanitization', ) ); $wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'spractice_page_breadcrumb', array( 'label' => __( 'Breadcrumb', 'aeen' ), 'section' => 'practice_archive_section', ) ) ); // Single Practice Slug $wp_customize->add_setting( 'single_practice_slug', array( 'default' => $this->defaults['single_practice_slug'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_text_sanitization' ) ); $wp_customize->add_control( 'single_practice_slug', array( 'label' => __( 'Single Practice Slug', 'aeen' ), 'section' => 'practice_archive_section', 'type' => 'text' ) ); // Banner padding top $wp_customize->add_setting( 'practice_sin_inner_padding_top', array( 'default' => $this->defaults['practice_sin_inner_padding_top'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_sanitize_integer', 'active_callback' => 'rttheme_is_single_practice_banner_enabled', ) ); $wp_customize->add_control( 'practice_sin_inner_padding_top', array( 'label' => __( 'Banner Padding Top', 'aeen' ), 'section' => 'practice_archive_section', 'type' => 'number', 'active_callback' => 'rttheme_is_single_practice_banner_enabled', ) ); // Banner padding bottom $wp_customize->add_setting( 'practice_sin_inner_padding_bottom', array( 'default' => $this->defaults['practice_sin_inner_padding_bottom'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_sanitize_integer', 'active_callback' => 'rttheme_is_single_practice_banner_enabled', ) ); $wp_customize->add_control( 'practice_sin_inner_padding_bottom', array( 'label' => __( 'Banner Padding Top', 'aeen' ), 'section' => 'practice_archive_section', 'type' => 'number', 'active_callback' => 'rttheme_is_single_practice_banner_enabled', ) ); } } /** * Initialise our Customizer settings only when they're required */ if ( class_exists( 'WP_Customize_Control' ) ) { new RDTheme_Practice_Archive_Settings(); }