Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
19 | function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
||
|
|||
20 | |||
21 | unset ( $field_options['search_filter'] ); |
||
22 | |||
23 | if( 'edit' === $context ) { |
||
24 | return $field_options; |
||
25 | } |
||
26 | |||
27 | $this->add_field_support('link_to_post', $field_options ); |
||
28 | |||
29 | // @since 1.5.4 |
||
30 | $this->add_field_support('dynamic_data', $field_options ); |
||
31 | |||
32 | return $field_options; |
||
33 | } |
||
34 | |||
38 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.