Beispiel #1
0
 public function render($key, $width = 200, $height = 100)
 {
     echo '<div class="simwp-input-image">';
     $opt = Simwp::get($key);
     if (!$opt) {
         $opt = '//placehold.it/' . $width . 'x' . $height . '/ddd/fdfdfd';
     }
     echo '<img src="' . $opt . '" width="' . $width . '" height="' . $height . '">';
     $this->set('type', 'hidden');
     parent::render($key);
     echo '<button type="button" class="button button-default add" style="width:' . $width / 2 . 'px">' . Simwp::trans('Upload') . '</button>';
     echo '<button type="button" class="button button-default delete" style="width:' . $width / 2 . 'px">' . Simwp::trans('Remove') . '</button>';
     echo '</div>';
 }
Beispiel #2
0
 public function render($key, $extra = '')
 {
     return parent::render($key, $extra . ' class="simwp-date-field"');
 }
Beispiel #3
0
 public function render($key, $extra = '')
 {
     return parent::render($key, $extra . ' class="simwp-tags"');
 }