| @@ 19-36 (lines=18) @@ | ||
| 16 | parent::__construct(); |
|
| 17 | } |
|
| 18 | ||
| 19 | function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
| 20 | ||
| 21 | if( 'edit' === $context ) { |
|
| 22 | return $field_options; |
|
| 23 | } |
|
| 24 | ||
| 25 | $new_fields = array( |
|
| 26 | 'quiz_use_max_score' => array( |
|
| 27 | 'type' => 'checkbox', |
|
| 28 | 'label' => __( 'Show Max Score?', 'gravityview' ), |
|
| 29 | 'desc' => __('Display score as the a fraction: "[score]/[max score]". If unchecked, will display score.', 'gravityview'), |
|
| 30 | 'value' => true, |
|
| 31 | 'merge_tags' => false, |
|
| 32 | ), |
|
| 33 | ); |
|
| 34 | ||
| 35 | return $new_fields + $field_options; |
|
| 36 | } |
|
| 37 | ||
| 38 | } |
|
| 39 | ||
| @@ 21-38 (lines=18) @@ | ||
| 18 | parent::__construct(); |
|
| 19 | } |
|
| 20 | ||
| 21 | function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
| 22 | ||
| 23 | unset( $field_options['search_filter'] ); |
|
| 24 | ||
| 25 | if( 'edit' === $context ) { |
|
| 26 | return $field_options; |
|
| 27 | } |
|
| 28 | ||
| 29 | $add_options['link_to_file'] = array( |
|
| 30 | 'type' => 'checkbox', |
|
| 31 | 'label' => __( 'Display as a Link:', 'gravityview' ), |
|
| 32 | 'desc' => __('Display the uploaded files as links, rather than embedded content.', 'gravityview'), |
|
| 33 | 'value' => false, |
|
| 34 | 'merge_tags' => false, |
|
| 35 | ); |
|
| 36 | ||
| 37 | return $add_options + $field_options; |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Return an array of files prepared for output. |
|