![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/renascerdoestoril.com/wp-content/themes/soccer-academy/inc/ |
<?php // Customizer slider control class Soccer_Academy_Slider_Custom_Control extends WP_Customize_Control { public $type = 'slider_control'; public function enqueue() { wp_enqueue_script( 'soccer-academy-controls-js', trailingslashit( esc_url(get_template_directory_uri()) ) . 'assets/js/custom-controls.js', array( 'jquery', 'jquery-ui-core' ), '1.0', true ); wp_enqueue_style( 'soccer-academy-controls-css', trailingslashit( esc_url(get_template_directory_uri()) ) . 'assets/css/custom-controls.css', array(), '1.0', 'all' ); } public function render_content() { ?> <div class="slider-custom-control"> <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span><input type="number" id="<?php echo esc_attr( $this->id ); ?>" name="<?php echo esc_attr( $this->id ); ?>" value="<?php echo esc_attr( $this->value() ); ?>" class="customize-control-slider-value" <?php $this->link(); ?> /> <div class="slider" slider-min-value="<?php echo esc_attr( $this->input_attrs['min'] ); ?>" slider-max-value="<?php echo esc_attr( $this->input_attrs['max'] ); ?>" slider-step-value="<?php echo esc_attr( $this->input_attrs['step'] ); ?>"></div><span class="slider-reset dashicons dashicons-image-rotate" slider-reset-value="<?php echo esc_attr( $this->input_attrs['reset'] ); ?>"></span> </div> <?php } } //image radio control class Soccer_Academy_Radio_Image_Control extends WP_Customize_Control { /** * The type of control being rendered */ public $type = 'image_radio_button'; /** * Enqueue our scripts and styles */ public function enqueue() { wp_enqueue_style( 'soccer-academy-controls-css', trailingslashit( esc_url(get_template_directory_uri()) ) . 'assets/css/custom-controls.css', array(), '1.0', 'all' ); } /** * Render the control in the customizer */ public function render_content() { ?> <div class="image_radio_button_control"> <?php if( !empty( $this->label ) ) { ?> <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php } ?> <?php if( !empty( $this->description ) ) { ?> <span class="customize-control-description"><?php echo esc_html( $this->description ); ?></span> <?php } ?> <?php foreach ( $this->choices as $key => $value ) { ?> <label class="radio-button-label"> <input type="radio" name="<?php echo esc_attr( $this->id ); ?>" value="<?php echo esc_attr( $key ); ?>" <?php $this->link(); ?> <?php checked( esc_attr( $key ), $this->value() ); ?>/> <img src="<?php echo esc_attr( $value['image'] ); ?>" alt="<?php echo esc_attr( $value['name'] ); ?>" title="<?php echo esc_attr( $value['name'] ); ?>" /> </label> <?php } ?> </div> <?php } } // Heading if( class_exists( 'WP_Customize_Control' ) ) { class Soccer_Academy_Customizer_Customcontrol_Section_Heading extends WP_Customize_Control { // Declare the control type. public $type = 'section'; // Render the control to be displayed in the Customizer. public function render_content() { ?> <div class="head-customize-section-description cus-head"> <span class="title head-customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php if ( !empty( $this->description ) ) : ?> <span class="description-customize-control-description"><?php echo esc_html( $this->description ); ?></span> <?php endif; ?> </div> <?php } } } // text radio buttons class Soccer_Academy_Text_Radio_Button_Custom_Control extends WP_Customize_Control { /** * The type of control being rendered */ public $type = 'text_radio_button'; /** * Enqueue our scripts and styles */ public function enqueue() { wp_enqueue_style( 'soccer-academy-controls-css', trailingslashit( esc_url(get_template_directory_uri()) ) . 'assets/css/custom-controls.css', array(), '1.0', 'all' ); } /** * Render the control in the customizer */ public function render_content() { ?> <div class = 'text_radio_button_control'> <?php if ( !empty( $this->label ) ) { ?> <span class = 'customize-control-title'><?php echo esc_html( $this->label );?></span> <?php }?> <?php if ( !empty( $this->description ) ) { ?> <span class = 'customize-control-description'><?php echo esc_html( $this->description ); ?></span> <?php } ?> <div class = 'radio-buttons'> <?php foreach ( $this->choices as $key => $value ) { ?> <label class = 'radio-button-label'> <input type = 'radio' name = "<?php echo esc_attr( $this->id ); ?>" value = "<?php echo esc_attr( $key ); ?>" <?php $this->link();?><?php checked( esc_attr( $key ), $this->value() );?>/> <span><?php echo esc_html( $value );?></span> </label> <?php }?> </div> </div> <?php } }