Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
30 | function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
||
31 | |||
32 | // Always a link! |
||
33 | unset( $field_options['show_as_link'], $field_options['search_filter'] ); |
||
34 | |||
35 | if( 'edit' === $context ) { |
||
36 | return $field_options; |
||
37 | } |
||
38 | |||
39 | $add_options = array(); |
||
40 | $add_options['entry_link_text'] = array( |
||
41 | 'type' => 'text', |
||
42 | 'label' => __( 'Link Text:', 'gravityview' ), |
||
43 | 'desc' => NULL, |
||
44 | 'value' => __('View Details', 'gravityview'), |
||
45 | 'merge_tags' => true, |
||
46 | ); |
||
47 | |||
48 | return $add_options + $field_options; |
||
49 | } |
||
50 | |||
54 |
This check looks for access to properties that are not accessible from the current context.
If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.