@@ -13,27 +13,27 @@ discard block |
||
13 | 13 | * @inheritDoc |
14 | 14 | * @since 1.7.2 |
15 | 15 | */ |
16 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
16 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
17 | 17 | |
18 | - if( 'edit' === $context ) { |
|
18 | + if ('edit' === $context) { |
|
19 | 19 | return $field_options; |
20 | 20 | } |
21 | 21 | |
22 | 22 | // No "Link to single entry"; all the items will be links to entries! |
23 | - unset( $field_options['show_as_link'] ); |
|
23 | + unset($field_options['show_as_link']); |
|
24 | 24 | |
25 | 25 | $new_options = array(); |
26 | 26 | |
27 | 27 | $new_options['link_format'] = array( |
28 | 28 | 'type' => 'text', |
29 | - 'label' => __( 'Entry link text (required)', 'gravityview' ), |
|
29 | + 'label' => __('Entry link text (required)', 'gravityview'), |
|
30 | 30 | 'value' => __('Entry #{entry_id}', 'gravityview'), |
31 | 31 | 'merge_tags' => 'force', |
32 | 32 | ); |
33 | 33 | |
34 | 34 | $new_options['after_link'] = array( |
35 | 35 | 'type' => 'textarea', |
36 | - 'label' => __( 'Text or HTML to display after the link (optional)', 'gravityview' ), |
|
36 | + 'label' => __('Text or HTML to display after the link (optional)', 'gravityview'), |
|
37 | 37 | 'desc' => __('This content will be displayed below each entry link.', 'gravityview'), |
38 | 38 | 'value' => '', |
39 | 39 | 'merge_tags' => 'force', |
@@ -42,24 +42,24 @@ discard block |
||
42 | 42 | |
43 | 43 | $new_options['page_size'] = array( |
44 | 44 | 'type' => 'number', |
45 | - 'label' => __( 'Entries to Display', 'gravityview' ), |
|
46 | - 'desc' => __( 'What is the maximum number of entries that should be shown?', 'gravityview' ), |
|
45 | + 'label' => __('Entries to Display', 'gravityview'), |
|
46 | + 'desc' => __('What is the maximum number of entries that should be shown?', 'gravityview'), |
|
47 | 47 | 'value' => '10', |
48 | 48 | 'merge_tags' => false, |
49 | 49 | ); |
50 | 50 | |
51 | 51 | $new_options['no_entries_hide'] = array( |
52 | 52 | 'type' => 'checkbox', |
53 | - 'label' => __( 'Hide if no entries', 'gravityview' ), |
|
54 | - 'desc' => __( 'Don\'t display this field if the entry creator has no other entries', 'gravityview' ), |
|
53 | + 'label' => __('Hide if no entries', 'gravityview'), |
|
54 | + 'desc' => __('Don\'t display this field if the entry creator has no other entries', 'gravityview'), |
|
55 | 55 | 'value' => false, |
56 | 56 | ); |
57 | 57 | |
58 | 58 | $new_options['no_entries_text'] = array( |
59 | 59 | 'type' => 'text', |
60 | - 'label' => __( 'No Entries Text', 'gravityview' ), |
|
61 | - 'desc' => __( 'The text that is shown if the entry creator has no other entries (and "Hide if no entries" is disabled).', 'gravityview' ), |
|
62 | - 'value' => __( 'This user has no other entries.', 'gravityview' ), |
|
60 | + 'label' => __('No Entries Text', 'gravityview'), |
|
61 | + 'desc' => __('The text that is shown if the entry creator has no other entries (and "Hide if no entries" is disabled).', 'gravityview'), |
|
62 | + 'value' => __('This user has no other entries.', 'gravityview'), |
|
63 | 63 | ); |
64 | 64 | |
65 | 65 | return $new_options + $field_options; |
@@ -7,14 +7,14 @@ |
||
7 | 7 | |
8 | 8 | var $name = 'post_category'; |
9 | 9 | |
10 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
10 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
11 | 11 | |
12 | - if( 'edit' === $context ) { |
|
12 | + if ('edit' === $context) { |
|
13 | 13 | return $field_options; |
14 | 14 | } |
15 | 15 | |
16 | - $this->add_field_support('dynamic_data', $field_options ); |
|
17 | - $this->add_field_support('link_to_term', $field_options ); |
|
16 | + $this->add_field_support('dynamic_data', $field_options); |
|
17 | + $this->add_field_support('link_to_term', $field_options); |
|
18 | 18 | |
19 | 19 | return $field_options; |
20 | 20 | } |
@@ -7,15 +7,15 @@ |
||
7 | 7 | |
8 | 8 | var $name = 'post_content'; |
9 | 9 | |
10 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
10 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
11 | 11 | |
12 | - unset( $field_options['show_as_link'] ); |
|
12 | + unset($field_options['show_as_link']); |
|
13 | 13 | |
14 | - if( 'edit' === $context ) { |
|
14 | + if ('edit' === $context) { |
|
15 | 15 | return $field_options; |
16 | 16 | } |
17 | 17 | |
18 | - $this->add_field_support('dynamic_data', $field_options ); |
|
18 | + $this->add_field_support('dynamic_data', $field_options); |
|
19 | 19 | |
20 | 20 | return $field_options; |
21 | 21 | } |
@@ -9,9 +9,9 @@ |
||
9 | 9 | |
10 | 10 | var $name = 'post_id'; |
11 | 11 | |
12 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
12 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
13 | 13 | |
14 | - $this->add_field_support('link_to_post', $field_options ); |
|
14 | + $this->add_field_support('link_to_post', $field_options); |
|
15 | 15 | |
16 | 16 | return $field_options; |
17 | 17 | } |
@@ -7,18 +7,18 @@ |
||
7 | 7 | |
8 | 8 | var $name = 'post_image'; |
9 | 9 | |
10 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
10 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
11 | 11 | |
12 | - unset ( $field_options['search_filter'] ); |
|
12 | + unset ($field_options['search_filter']); |
|
13 | 13 | |
14 | - if( 'edit' === $context ) { |
|
14 | + if ('edit' === $context) { |
|
15 | 15 | return $field_options; |
16 | 16 | } |
17 | 17 | |
18 | - $this->add_field_support('link_to_post', $field_options ); |
|
18 | + $this->add_field_support('link_to_post', $field_options); |
|
19 | 19 | |
20 | 20 | // @since 1.5.4 |
21 | - $this->add_field_support('dynamic_data', $field_options ); |
|
21 | + $this->add_field_support('dynamic_data', $field_options); |
|
22 | 22 | |
23 | 23 | return $field_options; |
24 | 24 | } |
@@ -7,14 +7,14 @@ |
||
7 | 7 | |
8 | 8 | var $name = 'post_tags'; |
9 | 9 | |
10 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
10 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
11 | 11 | |
12 | - if( 'edit' === $context ) { |
|
12 | + if ('edit' === $context) { |
|
13 | 13 | return $field_options; |
14 | 14 | } |
15 | 15 | |
16 | - $this->add_field_support('dynamic_data', $field_options ); |
|
17 | - $this->add_field_support('link_to_term', $field_options ); |
|
16 | + $this->add_field_support('dynamic_data', $field_options); |
|
17 | + $this->add_field_support('link_to_term', $field_options); |
|
18 | 18 | |
19 | 19 | return $field_options; |
20 | 20 | } |
@@ -7,15 +7,15 @@ |
||
7 | 7 | |
8 | 8 | var $name = 'post_title'; |
9 | 9 | |
10 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
10 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
11 | 11 | |
12 | - if( 'edit' === $context ) { |
|
12 | + if ('edit' === $context) { |
|
13 | 13 | return $field_options; |
14 | 14 | } |
15 | 15 | |
16 | - $this->add_field_support('link_to_post', $field_options ); |
|
16 | + $this->add_field_support('link_to_post', $field_options); |
|
17 | 17 | |
18 | - $this->add_field_support('dynamic_data', $field_options ); |
|
18 | + $this->add_field_support('dynamic_data', $field_options); |
|
19 | 19 | |
20 | 20 | return $field_options; |
21 | 21 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | function __construct() { |
11 | 11 | parent::__construct(); |
12 | 12 | |
13 | - add_filter( 'gravityview_field_entry_value_section', array( $this, 'prevent_empty_field' ) ); |
|
13 | + add_filter('gravityview_field_entry_value_section', array($this, 'prevent_empty_field')); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | /** |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | * |
23 | 23 | * @return string If output was empty, return an empty HTML comment tag. Otherwise, return output. |
24 | 24 | */ |
25 | - function prevent_empty_field( $output = '' ) { |
|
26 | - return empty( $output ) ? '<!-- -->' : $output; |
|
25 | + function prevent_empty_field($output = '') { |
|
26 | + return empty($output) ? '<!-- -->' : $output; |
|
27 | 27 | } |
28 | 28 | |
29 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
29 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
30 | 30 | |
31 | - unset ( $field_options['search_filter'], $field_options['show_as_link'] ); |
|
31 | + unset ($field_options['search_filter'], $field_options['show_as_link']); |
|
32 | 32 | |
33 | 33 | // Set the default CSS class to gv-section, which applies a border and top/bottom margin |
34 | 34 | $field_options['custom_class']['value'] = 'gv-section'; |
@@ -7,26 +7,26 @@ |
||
7 | 7 | |
8 | 8 | var $name = 'source_url'; |
9 | 9 | |
10 | - function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
|
10 | + function field_options($field_options, $template_id, $field_id, $context, $input_type) { |
|
11 | 11 | |
12 | 12 | // Don't link to entry; doesn't make sense. |
13 | - unset( $field_options['show_as_link'] ); |
|
13 | + unset($field_options['show_as_link']); |
|
14 | 14 | |
15 | - if( 'edit' === $context ) { |
|
15 | + if ('edit' === $context) { |
|
16 | 16 | return $field_options; |
17 | 17 | } |
18 | 18 | |
19 | 19 | $add_options = array(); |
20 | 20 | $add_options['link_to_source'] = array( |
21 | 21 | 'type' => 'checkbox', |
22 | - 'label' => __( 'Link to URL:', 'gravityview' ), |
|
22 | + 'label' => __('Link to URL:', 'gravityview'), |
|
23 | 23 | 'desc' => __('Display as a link to the Source URL', 'gravityview'), |
24 | 24 | 'value' => false, |
25 | 25 | 'merge_tags' => false, |
26 | 26 | ); |
27 | 27 | $add_options['source_link_text'] = array( |
28 | 28 | 'type' => 'text', |
29 | - 'label' => __( 'Link Text:', 'gravityview' ), |
|
29 | + 'label' => __('Link Text:', 'gravityview'), |
|
30 | 30 | 'desc' => __('Customize the link text. If empty, the link text will be the the URL.', 'gravityview'), |
31 | 31 | 'value' => NULL, |
32 | 32 | 'merge_tags' => true, |