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