form_sanitizer($_POST['block_title'], '', 'block_title'), 'block_description' => form_sanitizer($_POST['block_description'], '', 'block_description'), 'block_align' => form_sanitizer($_POST['block_align'], '', 'block_align'), 'block_class' => form_sanitizer($_POST['block_class'], '', 'block_class'), 'block_margin' => form_sanitizer($_POST['block_margin'], '', 'block_margin'), 'block_padding' => form_sanitizer($_POST['block_padding'], '', 'block_padding'), ]; if (\defender::safe()) { return \defender::serialize(self::$widget_data); } } public function validate_delete() { } public function display_form_input() { $lang = file_exists(WIDGETS."block/locale/".LANGUAGE.".php") ? WIDGETS."block/locale/".LANGUAGE.".php" : WIDGETS."block/locale/English.php"; $widget_locale = fusion_get_locale('', $lang); self::$widget_data = [ 'block_title' => '', 'block_description' => '', 'block_align' => '', 'block_class' => '', 'block_padding' => '30px', 'block_margin' => '15px 0px', ]; if (!empty(self::$colData['page_content'])) { self::$widget_data = \defender::unserialize(self::$colData['page_content']); } echo form_text('block_title', $widget_locale['BLKW_0200'], self::$widget_data['block_title'], ['inline' => TRUE]); echo form_textarea('block_description', $widget_locale['BLKW_0201'], self::$widget_data['block_description'], ['inline' => TRUE]); echo form_select('block_align', $widget_locale['BLKW_0202'], self::$widget_data['block_align'], [ 'inline' => TRUE, 'options' => [ '0' => $widget_locale['BLKW_0203'], 'text-left' => $widget_locale['BLKW_0204'], 'text-center' => $widget_locale['BLKW_0205'], 'text-right' => $widget_locale['BLKW_0206'], ] ] ); echo form_text('block_class', $widget_locale['BLKW_0207'], self::$widget_data['block_class'], ['inline' => TRUE]); ?>