PluginProbe
WP Ultimate Post Grid / 1.7.2
WP Ultimate Post Grid v1.7.2
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / vendor / vafpress / classes / control / field / upload.php

upload.php in WP Ultimate Post Grid 1.7.2, at vendor/vafpress/classes/control/field/upload.php

39 lines 733 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class VP_Control_Field_Upload extends VP_Control_Field
4 {
5
6 public function __construct()
7 {
8 parent::__construct();
9 }
10
11 public static function withArray($arr = array(), $class_name = null)
12 {
13 if(is_null($class_name))
14 $instance = new self();
15 else
16 $instance = new $class_name;
17 $instance->_basic_make($arr);
18 return $instance;
19 }
20
21 public function _setup_data()
22 {
23 $preview = VP_Util_Res::get_preview_from_url($this->get_value());
24 $this->add_data('preview', $preview);
25 parent::_setup_data();
26 }
27
28 public function render($is_compact = false)
29 {
30 $this->_setup_data();
31 $this->add_data('is_compact', $is_compact);
32 return VP_View::instance()->load('control/upload', $this->get_data());
33 }
34
35 }
36
37 /**
38 * EOF
39 */