D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
themes
/
aeen
/
inc
/
customizer
/
settings
/
Filename :
error.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 WP_Customize_Media_Control; use WP_Customize_Color_Control; /** * Adds the individual sections, settings, and controls to the theme customizer */ class RDTheme_Error_Settings extends RDTheme_Customizer { public function __construct() { parent::instance(); $this->populated_default_data(); // Add Controls add_action( 'customize_register', array( $this, 'register_error_controls' ) ); } public function register_error_controls( $wp_customize ) { // Error Text $wp_customize->add_setting( 'error_text1', array( 'default' => $this->defaults['error_text1'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_text_sanitization' ) ); $wp_customize->add_control( 'error_text1', array( 'label' => __( 'Error Text 1', 'aeen' ), 'section' => 'error_section', 'type' => 'text', ) ); // Error Text $wp_customize->add_setting( 'error_text2', array( 'default' => $this->defaults['error_text2'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_text_sanitization' ) ); $wp_customize->add_control( 'error_text2', array( 'label' => __( 'Error Text 2', 'aeen' ), 'section' => 'error_section', 'type' => 'text', ) ); // Button Text $wp_customize->add_setting( 'error_buttontext', array( 'default' => $this->defaults['error_buttontext'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_text_sanitization' ) ); $wp_customize->add_control( 'error_buttontext', array( 'label' => __( 'Button Text', 'aeen' ), 'section' => 'error_section', 'type' => 'text', ) ); // Image $wp_customize->add_setting( 'error_img', array( 'default' => $this->defaults['error_img'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_text_sanitization', ) ); $wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'error_img', array( 'label' => __( 'Error Image', 'aeen' ), 'description' => esc_html__( 'This is the description for the Media Control', 'aeen' ), 'section' => 'error_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' ), ) ) ) ); // Error content $wp_customize->add_setting( 'error_content', array( 'default' => $this->defaults['error_content'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_text_sanitization', ) ); $wp_customize->add_control( 'error_content', array( 'label' => __( 'Error Content', 'aeen' ), 'section' => 'error_section', 'type' => 'textarea', ) ); } } /** * Initialise our Customizer settings only when they're required */ if ( class_exists( 'WP_Customize_Control' ) ) { new RDTheme_Error_Settings(); }