function szgoogle_youtube_get_code_video($options = array()) { if (!($object = new SZGoogleActionYoutubeVideo())) { return false; } else { return $object->getHTMLCode($options); } }
/** * Generazione del codice HTML del widget per la * visualizzazione completa nella sidebar di appartenenza */ function widget($args, $instance) { // Controllo se esistono le variabili che servono durante l'elaborazione // dello script e assegno dei valori di default nel caso non fossero specificati $options = $this->common_empty(array('title' => '', 'url' => '', 'responsive' => '', 'width' => '', 'height' => '', 'margintop' => '', 'marginright' => '', 'marginbottom' => '', 'marginleft' => '', 'marginunit' => '', 'analytics' => '', 'delayed' => '', 'autoplay' => '', 'loop' => '', 'fullscreen' => '', 'schemaorg' => '', 'disableiframe' => '', 'disablekeyboard' => '', 'disablerelated' => '', 'name' => '', 'description' => '', 'duration' => '', 'start' => '', 'end' => '', 'theme' => '', 'cover' => ''), $instance); // Azzeramento variabile title per non confonderla con il title che deve // essere usato a livello di shortcode e non nei widgets $options['title'] = ''; // Creazione del codice HTML per il widget attuale richiamando la // funzione base che viene richiamata anche dallo shortcode corrispondente $OBJC = new SZGoogleActionYoutubeVideo(); $HTML = $OBJC->getHTMLCode($options); // Output del codice HTML legato al widget da visualizzare // chiamata alla funzione generale per wrap standard echo $this->common_widget($args, $instance, $HTML); }
/** * Generation of the HTML code of the widget * for the full display in the sidebar associated */ function widget($args, $instance) { // Checking whether there are the variables that are used during the processing // the script and check the default values in case they were not specified $options = $this->common_empty(array('title' => '', 'url' => '', 'responsive' => '', 'width' => '', 'height' => '', 'margintop' => '', 'marginright' => '', 'marginbottom' => '', 'marginleft' => '', 'marginunit' => '', 'analytics' => '', 'delayed' => '', 'autoplay' => '', 'loop' => '', 'fullscreen' => '', 'schemaorg' => '', 'disableiframe' => '', 'disablekeyboard' => '', 'disablerelated' => '', 'name' => '', 'description' => '', 'duration' => '', 'start' => '', 'end' => '', 'theme' => '', 'cover' => ''), $instance); // Cancel the variable title that belongs to the component // since there is the title of the widget and have the same name $options['title'] = ''; // Create the HTML code for the current widget recalling the basic // function which is also invoked by the corresponding shortcode $OBJC = new SZGoogleActionYoutubeVideo(); $HTML = $OBJC->getHTMLCode($options); // Output HTML code linked to the widget to // display call to the general standard for wrap echo $this->common_widget($args, $instance, $HTML); }