function widget($args, $instance) { global $bontoolkit; $awe = BON_TOOLKIT_FONT_AWESOME; extract($args); /* Our variables from the widget settings ---------------------------------------*/ $title = apply_filters('widget_title', $instance['title']); $embed = isset($instance['embed']) ? $instance['embed'] : ''; $poster = isset($instance['poster']) ? $instance['poster'] : ''; $m4v = isset($instance['m4v']) ? $instance['m4v'] : ''; $ogv = isset($instance['ogv']) ? $instance['ogv'] : ''; $desc = isset($instance['desc']) ? $instance['desc'] : ''; /* Display widget ---------------------------------------------------------------*/ echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $vid_args = array('embed' => $embed, 'm4v' => $m4v, 'ogv' => $ogv, 'poster' => $poster, 'id' => $this->id, 'echo' => true, 'desc' => $desc); bon_toolkit_video($vid_args); echo $after_widget; }
/** * Rendering Video Element. * * @since 1.0.0 * @param string $value * @access public * @return string */ public function render_video($value) { $o = apply_filters('bon_toolkit_builder_render_video_output', '', $value); if ($o != '') { return $o; } $args = array('embed' => $value['embed'], 'm4v' => $value['m4v'], 'ogv' => $value['ogv'], 'poster' => $value['poster'], 'desc' => $value['desc'], 'echo' => false); $o .= $this->render_header('video', $value['title']); $o .= bon_toolkit_video($args); return $o; }