1 | <?php |
||
8 | class PodsField_Code extends PodsField { |
||
9 | |||
10 | /** |
||
11 | * {@inheritdoc} |
||
12 | */ |
||
13 | public static $group = 'Paragraph'; |
||
14 | |||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | public static $type = 'code'; |
||
19 | |||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | */ |
||
23 | public static $label = 'Code (Syntax Highlighting)'; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | public static $prepare = '%s'; |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function setup() { |
||
34 | |||
35 | self::$label = __( 'Code (Syntax Highlighting)', 'pods' ); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function options() { |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function schema( $options = null ) { |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function display( $value = null, $name = null, $options = null, $pod = null, $id = null ) { |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function input( $name, $value = null, $options = null, $pod = null, $id = null ) { |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function pre_save( $value, $id = null, $name = null, $options = null, $fields = null, $pod = null, $params = null ) { |
||
136 | } |
||
137 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.