<?php
namespace Website\Widgets\Embed; use Moto; class Widget extends Moto\System\Widgets\AbstractWidget { protected $_name = 'embed'; protected static $_defaultProperties = array( 'animation' => '', 'visible_on' => 'mobile-v', 'align' => array( 'desktop' => 'left', 'tablet' => '', 'mobile-v' => '', 'mobile-h' => '', ), 'spacing' => array( 'top' => 'auto', 'right' => 'auto', 'bottom' => 'auto', 'left' => 'auto', ), 'preset' => 'default', 'code' => '', ); protected $_templateType = 'templates'; protected $_widgetId = true; public function getCode() { return base64_decode($this->properties['code']); } public function isExecutableCode() { if ((Moto\System\Request::getQuery('mode') == 'preview')) { return Moto\Website\Settings::get('widget_embed_execution', true); } return true; } } 