예제 #1
0
파일: Image.php 프로젝트: dumday/simwp
 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>';
 }
예제 #2
0
파일: DatePicker.php 프로젝트: dumday/simwp
 public function render($key, $extra = '')
 {
     return parent::render($key, $extra . ' class="simwp-date-field"');
 }
예제 #3
0
파일: Tags.php 프로젝트: dumday/simwp
 public function render($key, $extra = '')
 {
     return parent::render($key, $extra . ' class="simwp-tags"');
 }