Server IP : 184.154.167.98 / Your IP : 18.216.11.230 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/puertode/public_html/wp-content/plugins/gspeech/includes/ |
Upload File : |
<?php // no direct access! defined('ABSPATH') or die("No direct access"); class GSpeechWidget extends WP_Widget { function __construct() { parent::__construct('gspeech', esc_html__('GSpeech', 'gspeech'), array('description' => esc_html__('GSpeech - Text To Speech', 'gspeech'))); } public function widget($args, $instance) { echo $args['before_widget']; if(!empty($instance['title'])) { echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title']; } echo GSpeech::get_widget_code(array('position' => 'inline', 'wrapper_selector' => '.gtranslate_wrapper')); echo $args['after_widget']; } public function form($instance) { $title = !empty($instance['title']) ? $instance['title'] : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_attr_e('Title:', 'gspeech'); ?></label> <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>"> </p> <?php } public function update($new_instance, $old_instance) { $instance = array(); $instance['title'] = (!empty($new_instance['title'])) ? strip_tags($new_instance['title']) : ''; return $instance; } }