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 :
footer.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 WP_Customize_Media_Control; use WP_Customize_Color_Control; /** * Adds the individual sections, settings, and controls to the theme customizer */ class RDTheme_Footer_Settings extends RDTheme_Customizer { public function __construct() { parent::instance(); $this->populated_default_data(); // Add Controls add_action( 'customize_register', array( $this, 'register_footer_controls' ) ); } public function register_footer_controls( $wp_customize ) { // Footer Style $wp_customize->add_setting( 'footer_style', array( 'default' => $this->defaults['footer_style'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_radio_sanitization' ) ); $wp_customize->add_control( new Customizer_Image_Radio_Control( $wp_customize, 'footer_style', array( 'label' => __( 'Footer Layout', 'aeen' ), 'description' => esc_html__( 'You can override this settings only Mobile', 'aeen' ), 'section' => 'footer_section', 'choices' => array( '1' => array( 'image' => trailingslashit( get_template_directory_uri() ) . 'assets/img/footer-1.png', 'name' => __( 'Layout 1', 'aeen' ) ), '2' => array( 'image' => trailingslashit( get_template_directory_uri() ) . 'assets/img/footer-2.png', 'name' => __( 'Layout 2', 'aeen' ) ), '3' => array( 'image' => trailingslashit( get_template_directory_uri() ) . 'assets/img/footer-3.png', 'name' => __( 'Layout 3', 'aeen' ) ), ) ) ) ); // Display Footer Top Area $wp_customize->add_setting( 'display_footertop_area', array( 'default' => $this->defaults['display_footertop_area'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_switch_sanitization', 'active_callback' => 'rttheme_is_footer1_enabled', ) ); $wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'display_footertop_area', array( 'label' => __( 'Display Top Area', 'aeen' ), 'section' => 'footer_section', 'active_callback' => 'rttheme_is_footer1_enabled', ) ) ); // Call To Action $wp_customize->add_setting( 'footer1_cta_text', array( 'default' => $this->defaults['footer1_cta_text'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_text_sanitization', 'active_callback' => 'rttheme_is_display_footertop_enabled', ) ); $wp_customize->add_control( 'footer1_cta_text', array( 'label' => __( 'CTA Text', 'aeen' ), 'section' => 'footer_section', 'type' => 'text', 'active_callback' => 'rttheme_is_display_footertop_enabled', ) ); // Call To Action Description $wp_customize->add_setting( 'footer1_cta_desc', array( 'default' => $this->defaults['footer1_cta_desc'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_text_sanitization', 'active_callback' => 'rttheme_is_display_footertop_enabled', ) ); $wp_customize->add_control( 'footer1_cta_desc', array( 'label' => __( 'CTA Description', 'aeen' ), 'section' => 'footer_section', 'type' => 'text', 'active_callback' => 'rttheme_is_display_footertop_enabled', ) ); // Display Widgets Area $wp_customize->add_setting( 'display_footer_widgets_area', array( 'default' => $this->defaults['display_footer_widgets_area'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_switch_sanitization', 'active_callback' => 'rttheme_is_footer1_enabled', ) ); $wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'display_footer_widgets_area', array( 'label' => __( 'Display Widgets Area', 'aeen' ), 'section' => 'footer_section', 'active_callback' => 'rttheme_is_footer1_enabled', ) ) ); // Display Copyright Area $wp_customize->add_setting( 'display_copyright_area', array( 'default' => $this->defaults['display_copyright_area'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_switch_sanitization', 'active_callback' => 'rttheme_is_footer1_enabled', ) ); $wp_customize->add_control( new Customizer_Switch_Control( $wp_customize, 'display_copyright_area', array( 'label' => __( 'Display Copyright Area', 'aeen' ), 'section' => 'footer_section', 'active_callback' => 'rttheme_is_footer1_enabled', ) ) ); // Copyright Text $wp_customize->add_setting( 'copyright_text', array( 'default' => $this->defaults['copyright_text'], 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_textarea_field', 'active_callback' => 'rttheme_is_display_copyright_enabled', ) ); $wp_customize->add_control( 'copyright_text', array( 'label' => __( 'Copyright Text', 'aeen' ), 'section' => 'footer_section', 'type' => 'textarea', 'active_callback' => 'rttheme_is_display_copyright_enabled', ) ); // Footer Top background color $wp_customize->add_setting('footer_top_bgcolor', array( 'default' => $this->defaults['footer_top_bgcolor'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_top_bgcolor', array( 'label' => esc_html__('Footer Top Background Color', 'aeen'), 'settings' => 'footer_top_bgcolor', 'priority' => 10, 'section' => 'footer_section', ) )); // Footer Bottom background color $wp_customize->add_setting('footer_bottom_bgcolor', array( 'default' => $this->defaults['footer_bottom_bgcolor'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_bottom_bgcolor', array( 'label' => esc_html__('Footer Bottom Background Color', 'aeen'), 'settings' => 'footer_bottom_bgcolor', 'priority' => 10, 'section' => 'footer_section', ) )); } } /** * Initialise our Customizer settings only when they're required */ if ( class_exists( 'WP_Customize_Control' ) ) { new RDTheme_Footer_Settings(); }