| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 16 | function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
||
| 17 | |||
| 18 | if( 'edit' === $context ) { |
||
| 19 | return $field_options; |
||
| 20 | } |
||
| 21 | |||
| 22 | $field_options['name_display'] = array( |
||
| 23 | 'type' => 'select', |
||
| 24 | 'label' => __( 'User Format', 'gravityview' ), |
||
| 25 | 'desc' => __( 'How should the User information be displayed?', 'gravityview'), |
||
| 26 | 'choices' => array( |
||
| 27 | 'display_name' => __('Display Name (Example: "Ellen Ripley")', 'gravityview'), |
||
| 28 | 'user_login' => __('Username (Example: "nostromo")', 'gravityview'), |
||
| 29 | 'ID' => __('User ID # (Example: 426)', 'gravityview'), |
||
| 30 | ), |
||
| 31 | 'value' => 'display_name' |
||
| 32 | ); |
||
| 33 | |||
| 34 | return $field_options; |
||
| 35 | } |
||
| 36 | |||
| 40 |
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.