@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
40 | 40 | |
41 | - if( 'edit' === $context ) { |
|
41 | + if ( 'edit' === $context ) { |
|
42 | 42 | return $field_options; |
43 | 43 | } |
44 | 44 | |
45 | - $field_options['link_phone'] = array( |
|
45 | + $field_options[ 'link_phone' ] = array( |
|
46 | 46 | 'type' => 'checkbox', |
47 | 47 | 'label' => __( 'Make Phone Number Clickable', 'gravityview' ), |
48 | - 'desc' => __( 'Allow dialing a number by clicking it?', 'gravityview'), |
|
48 | + 'desc' => __( 'Allow dialing a number by clicking it?', 'gravityview' ), |
|
49 | 49 | 'value' => true, |
50 | 50 | ); |
51 | 51 |
@@ -29,16 +29,16 @@ discard block |
||
29 | 29 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
30 | 30 | |
31 | 31 | // It makes no sense to use this as the link. |
32 | - unset( $field_options['show_as_link'] ); |
|
32 | + unset( $field_options[ 'show_as_link' ] ); |
|
33 | 33 | |
34 | - if( 'edit' === $context ) { |
|
34 | + if ( 'edit' === $context ) { |
|
35 | 35 | return $field_options; |
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @since 1.8 |
40 | 40 | */ |
41 | - $field_options['anchor_text'] = array( |
|
41 | + $field_options[ 'anchor_text' ] = array( |
|
42 | 42 | 'type' => 'text', |
43 | 43 | 'label' => __( 'Link Text:', 'gravityview' ), |
44 | 44 | 'desc' => __( 'Define custom link text. Leave blank to display the URL', 'gravityview' ), |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | 'merge_tags' => 'force', |
47 | 47 | ); |
48 | 48 | |
49 | - $field_options['truncatelink'] = array( |
|
49 | + $field_options[ 'truncatelink' ] = array( |
|
50 | 50 | 'type' => 'checkbox', |
51 | 51 | 'value' => true, |
52 | 52 | 'label' => __( 'Shorten Link Display', 'gravityview' ), |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'desc' => __( 'Don’t show the full URL, only show the domain.', 'gravityview' ) |
55 | 55 | ); |
56 | 56 | |
57 | - $field_options['open_same_window'] = array( |
|
57 | + $field_options[ 'open_same_window' ] = array( |
|
58 | 58 | 'type' => 'checkbox', |
59 | 59 | 'value' => false, |
60 | 60 | 'label' => __( 'Open link in the same window?', 'gravityview' ), |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
20 | 20 | |
21 | - if( 'edit' === $context ) { |
|
21 | + if ( 'edit' === $context ) { |
|
22 | 22 | return $field_options; |
23 | 23 | } |
24 | 24 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | 'quiz_show_explanation' => array( |
27 | 27 | 'type' => 'checkbox', |
28 | 28 | 'label' => __( 'Show Answer Explanation?', 'gravityview' ), |
29 | - 'desc' => __('If the field has an answer explanation, show it?', 'gravityview'), |
|
29 | + 'desc' => __( 'If the field has an answer explanation, show it?', 'gravityview' ), |
|
30 | 30 | 'value' => false, |
31 | 31 | 'merge_tags' => false, |
32 | 32 | ), |
@@ -22,13 +22,13 @@ |
||
22 | 22 | |
23 | 23 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
24 | 24 | |
25 | - unset( $field_options['search_filter'] ); |
|
25 | + unset( $field_options[ 'search_filter' ] ); |
|
26 | 26 | |
27 | 27 | if ( 'edit' === $context ) { |
28 | 28 | return $field_options; |
29 | 29 | } |
30 | 30 | |
31 | - $add_options['embed'] = array( |
|
31 | + $add_options[ 'embed' ] = array( |
|
32 | 32 | 'type' => 'checkbox', |
33 | 33 | 'label' => __( 'Display as embedded', 'gravityview' ), |
34 | 34 | 'desc' => __( 'Display the video in a player, rather than a direct link to the video.', 'gravityview' ), |
@@ -31,17 +31,17 @@ |
||
31 | 31 | |
32 | 32 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
33 | 33 | |
34 | - $field_options['number_format'] = array( |
|
34 | + $field_options[ 'number_format' ] = array( |
|
35 | 35 | 'type' => 'checkbox', |
36 | 36 | 'label' => __( 'Format number?', 'gravityview' ), |
37 | - 'desc' => __('Display numbers with thousands separators.', 'gravityview'), |
|
37 | + 'desc' => __( 'Display numbers with thousands separators.', 'gravityview' ), |
|
38 | 38 | 'value' => false, |
39 | 39 | ); |
40 | 40 | |
41 | - $field_options['decimals'] = array( |
|
41 | + $field_options[ 'decimals' ] = array( |
|
42 | 42 | 'type' => 'number', |
43 | 43 | 'label' => __( 'Decimals', 'gravityview' ), |
44 | - 'desc' => __('Precision of the number of decimal places. Leave blank to use existing precision.', 'gravityview'), |
|
44 | + 'desc' => __( 'Precision of the number of decimal places. Leave blank to use existing precision.', 'gravityview' ), |
|
45 | 45 | 'value' => '', |
46 | 46 | 'merge_tags' => false, |
47 | 47 | ); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
29 | 29 | |
30 | - unset ( $field_options['search_filter'], $field_options['show_as_link'] ); |
|
30 | + unset ( $field_options[ 'search_filter' ], $field_options[ 'show_as_link' ] ); |
|
31 | 31 | |
32 | 32 | return $field_options; |
33 | 33 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
33 | 33 | |
34 | - $this->add_field_support('link_to_post', $field_options ); |
|
34 | + $this->add_field_support( 'link_to_post', $field_options ); |
|
35 | 35 | |
36 | 36 | return $field_options; |
37 | 37 | } |
@@ -28,9 +28,9 @@ |
||
28 | 28 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
29 | 29 | |
30 | 30 | // It makes no sense to use this as the link. |
31 | - unset( $field_options['show_as_link'] ); |
|
31 | + unset( $field_options[ 'show_as_link' ] ); |
|
32 | 32 | |
33 | - if( 'edit' === $context ) { |
|
33 | + if ( 'edit' === $context ) { |
|
34 | 34 | return $field_options; |
35 | 35 | } |
36 | 36 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | function load() { |
26 | 26 | |
27 | - if( !is_admin() ) { |
|
27 | + if ( ! is_admin() ) { |
|
28 | 28 | return; |
29 | 29 | } |
30 | 30 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | add_filter( 'gravityview_template_edit_link_options', array( $this, 'edit_link_field_options' ), 10, 5 ); |
39 | 39 | |
40 | 40 | // add tooltips |
41 | - add_filter( 'gravityview/metaboxes/tooltips', array( $this, 'tooltips') ); |
|
41 | + add_filter( 'gravityview/metaboxes/tooltips', array( $this, 'tooltips' ) ); |
|
42 | 42 | |
43 | 43 | // custom fields' options for zone EDIT |
44 | 44 | add_filter( 'gravityview_template_field_options', array( $this, 'field_options' ), 10, 6 ); |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | */ |
53 | 53 | function add_default_field( $entry_default_fields, $form = array(), $zone = '' ) { |
54 | 54 | |
55 | - if( $zone !== 'edit' ) { |
|
55 | + if ( $zone !== 'edit' ) { |
|
56 | 56 | |
57 | - $entry_default_fields['edit_link'] = array( |
|
58 | - 'label' => __('Edit Entry', 'gravityview'), |
|
57 | + $entry_default_fields[ 'edit_link' ] = array( |
|
58 | + 'label' => __( 'Edit Entry', 'gravityview' ), |
|
59 | 59 | 'type' => 'edit_link', |
60 | - 'desc' => __('A link to edit the entry. Visible based on View settings.', 'gravityview'), |
|
60 | + 'desc' => __( 'A link to edit the entry. Visible based on View settings.', 'gravityview' ), |
|
61 | 61 | ); |
62 | 62 | |
63 | 63 | } |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | $caps = $visibility_caps; |
82 | 82 | |
83 | 83 | // If we're configuring fields in the edit context, we want a limited selection |
84 | - if( $context === 'edit' ) { |
|
84 | + if ( $context === 'edit' ) { |
|
85 | 85 | |
86 | 86 | // Remove other built-in caps. |
87 | - unset( $caps['publish_posts'], $caps['gravityforms_view_entries'], $caps['delete_others_posts'] ); |
|
87 | + unset( $caps[ 'publish_posts' ], $caps[ 'gravityforms_view_entries' ], $caps[ 'delete_others_posts' ] ); |
|
88 | 88 | |
89 | - $caps['read'] = _x('Entry Creator','User capability', 'gravityview'); |
|
89 | + $caps[ 'read' ] = _x( 'Entry Creator', 'User capability', 'gravityview' ); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | return $caps; |
@@ -104,16 +104,16 @@ discard block |
||
104 | 104 | function edit_link_field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
105 | 105 | |
106 | 106 | // Always a link, never a filter |
107 | - unset( $field_options['show_as_link'], $field_options['search_filter'] ); |
|
107 | + unset( $field_options[ 'show_as_link' ], $field_options[ 'search_filter' ] ); |
|
108 | 108 | |
109 | 109 | // Edit Entry link should only appear to visitors capable of editing entries |
110 | - unset( $field_options['only_loggedin'], $field_options['only_loggedin_cap'] ); |
|
110 | + unset( $field_options[ 'only_loggedin' ], $field_options[ 'only_loggedin_cap' ] ); |
|
111 | 111 | |
112 | - $add_option['edit_link'] = array( |
|
112 | + $add_option[ 'edit_link' ] = array( |
|
113 | 113 | 'type' => 'text', |
114 | 114 | 'label' => __( 'Edit Link Text', 'gravityview' ), |
115 | 115 | 'desc' => NULL, |
116 | - 'value' => __('Edit Entry', 'gravityview'), |
|
116 | + 'value' => __( 'Edit Entry', 'gravityview' ), |
|
117 | 117 | 'merge_tags' => true, |
118 | 118 | ); |
119 | 119 | |
@@ -129,9 +129,9 @@ discard block |
||
129 | 129 | |
130 | 130 | $return = $tooltips; |
131 | 131 | |
132 | - $return['allow_edit_cap'] = array( |
|
133 | - 'title' => __('Limiting Edit Access', 'gravityview'), |
|
134 | - 'value' => __('Change this setting if you don\'t want the user who created the entry to be able to edit this field.', 'gravityview'), |
|
132 | + $return[ 'allow_edit_cap' ] = array( |
|
133 | + 'title' => __( 'Limiting Edit Access', 'gravityview' ), |
|
134 | + 'value' => __( 'Change this setting if you don\'t want the user who created the entry to be able to edit this field.', 'gravityview' ), |
|
135 | 135 | ); |
136 | 136 | |
137 | 137 | return $return; |
@@ -149,12 +149,12 @@ discard block |
||
149 | 149 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
150 | 150 | |
151 | 151 | // We only want to modify the settings for the edit context |
152 | - if( 'edit' !== $context ) { |
|
152 | + if ( 'edit' !== $context ) { |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * @since 1.8.4 |
156 | 156 | */ |
157 | - $field_options['new_window'] = array( |
|
157 | + $field_options[ 'new_window' ] = array( |
|
158 | 158 | 'type' => 'checkbox', |
159 | 159 | 'label' => __( 'Open link in a new tab or window?', 'gravityview' ), |
160 | 160 | 'value' => false, |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | // Entry field is only for logged in users |
167 | - unset( $field_options['only_loggedin'], $field_options['only_loggedin_cap'] ); |
|
167 | + unset( $field_options[ 'only_loggedin' ], $field_options[ 'only_loggedin_cap' ] ); |
|
168 | 168 | |
169 | 169 | $add_options = array( |
170 | 170 | 'allow_edit_cap' => array( |