Server IP : 172.67.157.199 / Your IP : 3.133.115.42 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/themes/izo/inc/customizer/custom-controls/ |
Upload File : |
<?php /** * Toggle control * * @package Izo */ class Izo_Toggle_Control extends WP_Customize_Control { /** * The type of control being rendered */ public $type = 'izo-toggle_switch'; /** * Render the control in the customizer */ public function render_content(){ ?> <div class="toggle-switch-control"> <div class="toggle-switch"> <input type="checkbox" id="<?php echo esc_attr($this->id); ?>" name="<?php echo esc_attr($this->id); ?>" class="toggle-switch-checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); checked( $this->value() ); ?>> <label class="toggle-switch-label" for="<?php echo esc_attr( $this->id ); ?>"> <span class="toggle-switch-inner"></span> <span class="toggle-switch-switch"></span> </label> </div> <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php if( !empty( $this->description ) ) { ?> <span class="customize-control-description"><?php echo esc_html( $this->description ); ?></span> <?php } ?> </div> <?php } }