1 | <?php |
||
13 | class Image_Field extends File_Field { |
||
14 | public $field_type = 'image'; |
||
15 | |||
16 | /** |
||
17 | * The size of the image preview |
||
18 | * |
||
19 | * @see set_preview_size() |
||
20 | * @var string|array |
||
21 | */ |
||
22 | protected $preview_size = [ |
||
23 | 'width' => 130, |
||
24 | 'height' => 130, |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * Get the image preview size. |
||
29 | * |
||
30 | * @return string|array |
||
31 | */ |
||
32 | public function get_preview_size() { |
||
35 | |||
36 | /** |
||
37 | * Set the image preview size. |
||
38 | * |
||
39 | * @param string|array $size |
||
40 | * @return self $this |
||
41 | */ |
||
42 | public function set_preview_size( $size ) { |
||
62 | |||
63 | /** |
||
64 | * {@inheritDoc} |
||
65 | */ |
||
66 | public function to_json( $load ) { |
||
75 | } |
||
76 |