HEX
Server: Apache
System: Linux webm005.cluster121.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: adventp (418412)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/adventp/www/wp-content/themes/brooklyn/unite-custom/widgets/ut_video_widget.php
<?php

if ( ! defined( 'ABSPATH' ) ) exit;

class WP_Widget_Video extends WP_Widget {

	function __construct() {
		$widget_ops = array('classname' => 'ut_widget_video', 'description' => __( 'Insert your embedded code in here!', 'unitedthemes') );
		parent::__construct('ut_video', __('United Themes - Embedded Video', 'unitedthemes'), $widget_ops);
		$this->alt_option_name = 'ut_video_widget';

	}
	function form($instance) {
	
	$title = ( isset($instance['title']) && !empty($instance['title']) ) ? $instance['title'] : '';
	$text = ( isset($instance['text']) && !empty($instance['text']) ) ? $instance['text'] : '';
	
	?>

    <label><?php _e('Title', 'unitedthemes'); ?>: <input type="text" style="width:100%;" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" value="<?php echo esc_attr( $title ); ?>" /></label>
    <label><?php _e('Text', 'unitedthemes'); ?>: <textarea class="widefat" rows="16" cols="20" id="<?php echo esc_attr( $this->get_field_id('text') ); ?>" name="<?php echo esc_attr( $this->get_field_name('text') ); ?>"><?php echo esc_html( $text ); ?></textarea></label>
    
	<?php

    }

    function update($new_instance, $old_instance) {
        return $new_instance;
    }

    function widget( $args, $instance ){

	extract( $args );
	extract( $instance );

	if( $title )
	    $title = $before_title.do_shortcode($title).$after_title;

	$text = do_shortcode( $text );
	$text = $title.'<div class="ut-video">'.$text.'</div>';

	echo "$before_widget
	    	$text
		  $after_widget";
    }

}