@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | * @return \GV\Field The field implementation from configuration (\GV\GF_Field, \GV\Internal_Field). |
167 | 167 | */ |
168 | 168 | public static function from_configuration( $configuration ) { |
169 | - if ( empty( $configuration['id'] ) ) { |
|
169 | + if ( empty( $configuration[ 'id' ] ) ) { |
|
170 | 170 | $field = new self(); |
171 | 171 | gravityview()->log->error( 'Trying to get field from configuration without a field ID.', array( 'data' => $configuration ) ); |
172 | 172 | $field->update_configuration( $configuration ); |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | } else { |
180 | 180 | $trace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); |
181 | 181 | } |
182 | - $trace = $trace[1]; |
|
183 | - if ( $trace['function'] == 'from_configuration' && $trace['class'] == __CLASS__ ) { |
|
182 | + $trace = $trace[ 1 ]; |
|
183 | + if ( $trace[ 'function' ] == 'from_configuration' && $trace[ 'class' ] == __CLASS__ ) { |
|
184 | 184 | $field = new self(); |
185 | 185 | gravityview()->log->error( 'Infinite loop protection tripped. Returning default class here.' ); |
186 | 186 | $field->update_configuration( $configuration ); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } |
189 | 189 | |
190 | 190 | /** @type \GV\GF_Field|\GV\Internal_Field $field_class Determine the field implementation to use, and try to use. */ |
191 | - $field_class = is_numeric( $configuration['id'] ) ? '\GV\GF_Field' : '\GV\Internal_Field'; |
|
191 | + $field_class = is_numeric( $configuration[ 'id' ] ) ? '\GV\GF_Field' : '\GV\Internal_Field'; |
|
192 | 192 | |
193 | 193 | /** |
194 | 194 | * @filter `gravityview/field/class` Filter the field class about to be created from the configuration. |
@@ -227,24 +227,24 @@ discard block |
||
227 | 227 | public function update_configuration( $configuration ) { |
228 | 228 | $configuration = wp_parse_args( $configuration, $this->as_configuration() ); |
229 | 229 | |
230 | - if ( $this->ID != $configuration['id'] ) { |
|
230 | + if ( $this->ID != $configuration[ 'id' ] ) { |
|
231 | 231 | /** Smelling trouble here... */ |
232 | 232 | gravityview()->log->warning( 'ID is being changed for {field_class} instance, but implementation is not. Use ::from_configuration instead', array( 'field_class', __CLASS__ ) ); |
233 | 233 | } |
234 | 234 | |
235 | - $this->ID = $configuration['id']; |
|
236 | - $this->label = $configuration['label']; |
|
237 | - $this->show_label = $configuration['show_label'] == '1'; |
|
238 | - $this->custom_label = $configuration['custom_label']; |
|
239 | - $this->custom_class = $configuration['custom_class']; |
|
240 | - $this->cap = $configuration['only_loggedin'] == '1' ? $configuration['only_loggedin_cap'] : ''; |
|
241 | - $this->search_filter = $configuration['search_filter'] == '1'; |
|
242 | - $this->show_as_link = $configuration['show_as_link'] == '1'; |
|
235 | + $this->ID = $configuration[ 'id' ]; |
|
236 | + $this->label = $configuration[ 'label' ]; |
|
237 | + $this->show_label = $configuration[ 'show_label' ] == '1'; |
|
238 | + $this->custom_label = $configuration[ 'custom_label' ]; |
|
239 | + $this->custom_class = $configuration[ 'custom_class' ]; |
|
240 | + $this->cap = $configuration[ 'only_loggedin' ] == '1' ? $configuration[ 'only_loggedin_cap' ] : ''; |
|
241 | + $this->search_filter = $configuration[ 'search_filter' ] == '1'; |
|
242 | + $this->show_as_link = $configuration[ 'show_as_link' ] == '1'; |
|
243 | 243 | |
244 | 244 | /** Shared among all field types (sort of). */ |
245 | 245 | $shared_configuration_keys = array( |
246 | 246 | 'id', 'label', 'show_label', 'custom_label', 'custom_class', |
247 | - 'only_loggedin' ,'only_loggedin_cap', 'search_filter', 'show_as_link', |
|
247 | + 'only_loggedin', 'only_loggedin_cap', 'search_filter', 'show_as_link', |
|
248 | 248 | ); |
249 | 249 | |
250 | 250 | /** Everything else goes into the properties for now. @todo subclasses! */ |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | |
274 | 274 | /** A custom label is available. */ |
275 | 275 | if ( ! empty( $this->custom_label ) ) { |
276 | - return \GravityView_API::replace_variables( $this->custom_label, $source ? $source->form ? : null : null, $entry ? $entry->as_entry() : null ); |
|
276 | + return \GravityView_API::replace_variables( $this->custom_label, $source ? $source->form ?: null : null, $entry ? $entry->as_entry() : null ); |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | return ''; |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | * @return mixed|null The value for the given configuration key, null if doesn't exist. |
360 | 360 | */ |
361 | 361 | public function __get( $key ) { |
362 | - switch( $key ) { |
|
362 | + switch ( $key ) { |
|
363 | 363 | default: |
364 | 364 | if ( isset( $this->configuration[ $key ] ) ) { |
365 | 365 | return $this->configuration[ $key ]; |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | * @return boolean Whether this $key is set or not. |
378 | 378 | */ |
379 | 379 | public function __isset( $key ) { |
380 | - switch( $key ) { |
|
380 | + switch ( $key ) { |
|
381 | 381 | default: |
382 | 382 | return isset( $this->configuration[ $key ] ); |
383 | 383 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $partial_entries_addon = GF_Partial_Entries::get_instance(); |
55 | 55 | |
56 | - $feed_settings = $partial_entries_addon->get_feed_settings( $form['id'] ); |
|
56 | + $feed_settings = $partial_entries_addon->get_feed_settings( $form[ 'id' ] ); |
|
57 | 57 | |
58 | 58 | $is_enabled = \GV\Utils::get( $feed_settings, 'enable', 0 ); |
59 | 59 | |
@@ -70,14 +70,14 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | // Set the expected $_POST key for the Add-On to use |
73 | - $_POST['partial_entry_id'] = $partial_entry_id; |
|
73 | + $_POST[ 'partial_entry_id' ] = $partial_entry_id; |
|
74 | 74 | |
75 | 75 | gravityview()->log->debug( 'Saving partial entry (ID #{partial_entry_id}) for Entry #{entry_id}', array( |
76 | 76 | 'partial_entry_id' => $partial_entry_id, |
77 | 77 | 'entry_id' => $entry_id |
78 | 78 | ) ); |
79 | 79 | |
80 | - $partial_entries_addon->maybe_save_partial_entry( $form['id'] ); |
|
80 | + $partial_entries_addon->maybe_save_partial_entry( $form[ 'id' ] ); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | * @return GravityView_Field | bool |
43 | 43 | */ |
44 | 44 | public static function create( $properties ) { |
45 | - $type = isset( $properties['type'] ) ? $properties['type'] : ''; |
|
46 | - $type = empty( $properties['inputType'] ) ? $type : $properties['inputType']; |
|
45 | + $type = isset( $properties[ 'type' ] ) ? $properties[ 'type' ] : ''; |
|
46 | + $type = empty( $properties[ 'inputType' ] ) ? $type : $properties[ 'inputType' ]; |
|
47 | 47 | if ( empty( $type ) || ! isset( self::$_fields[ $type ] ) ) { |
48 | 48 | return new GravityView_Field( $properties ); |
49 | 49 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * @return bool True: yes, it exists; False: nope |
63 | 63 | */ |
64 | 64 | public static function exists( $field_name ) { |
65 | - return isset( self::$_fields["{$field_name}"] ); |
|
65 | + return isset( self::$_fields[ "{$field_name}" ] ); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | |
97 | 97 | $field_type = is_a( $gf_field, 'GF_Field' ) ? get_class( $gf_field ) : $gf_field; |
98 | 98 | |
99 | - foreach( self::$_fields as $field ) { |
|
100 | - if( $field_type === $field->_gf_field_class_name ) { |
|
99 | + foreach ( self::$_fields as $field ) { |
|
100 | + if ( $field_type === $field->_gf_field_class_name ) { |
|
101 | 101 | return $field; |
102 | 102 | } |
103 | 103 | } |
@@ -116,13 +116,13 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public static function get_all( $groups = '' ) { |
118 | 118 | |
119 | - if( '' !== $groups ) { |
|
119 | + if ( '' !== $groups ) { |
|
120 | 120 | $return_fields = self::$_fields; |
121 | 121 | |
122 | - $groups = (array) $groups; |
|
122 | + $groups = (array)$groups; |
|
123 | 123 | |
124 | 124 | foreach ( $return_fields as $key => $field ) { |
125 | - if( ! in_array( $field->group, $groups, true ) ) { |
|
125 | + if ( ! in_array( $field->group, $groups, true ) ) { |
|
126 | 126 | unset( $return_fields[ $key ] ); |
127 | 127 | } |
128 | 128 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | ?> |
10 | 10 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php |
11 | 11 | |
12 | - echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
|
12 | + echo '<span class="gv-label">' . $this->get_field_label() . '</span>'; |
|
13 | 13 | echo $this->get_tooltip() . $this->get_field_desc(); |
14 | 14 | ?><div> |
15 | 15 | <?php $this->render_input(); ?> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | function render_input( $override_input = null ) { |
22 | - if( isset( $override_input ) ) { |
|
22 | + if ( isset( $override_input ) ) { |
|
23 | 23 | echo $override_input; |
24 | 24 | return; |
25 | 25 | } |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | |
29 | 29 | $show_mt = $this->show_merge_tags(); |
30 | 30 | |
31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
31 | + if ( $show_mt && $this->field[ 'merge_tags' ] !== false || $this->field[ 'merge_tags' ] === 'force' ) { |
|
32 | 32 | $class .= ' merge-tag-support mt-position-right '; |
33 | 33 | |
34 | - if( empty( $this->field['show_all_fields'] ) ) { |
|
34 | + if ( empty( $this->field[ 'show_all_fields' ] ) ) { |
|
35 | 35 | $class .= ' mt-hide_all_fields '; |
36 | 36 | } |
37 | 37 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | # $this->codemirror( $this->get_field_id() ); |
50 | 50 | |
51 | 51 | ?> |
52 | - <textarea name="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo gravityview_sanitize_html_class( $class ); ?>" rows="<?php echo absint( $rows ); ?>"><?php echo esc_textarea( $this->value ); ?></textarea> |
|
52 | + <textarea name="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo gravityview_sanitize_html_class( $class ); ?>" rows="<?php echo absint( $rows ); ?>"><?php echo esc_textarea( $this->value ); ?></textarea> |
|
53 | 53 | <?php |
54 | 54 | } |
55 | 55 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | ?> |
67 | 67 | |
68 | 68 | <script> |
69 | - wp.codeEditor.initialize( "<?php echo $field_id;?>", {}); |
|
69 | + wp.codeEditor.initialize( "<?php echo $field_id; ?>", {}); |
|
70 | 70 | </script> |
71 | 71 | <?php |
72 | 72 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * @deprecated |
115 | 115 | * @see The `gravityview/view_collection/from_post/meta_keys` filter. |
116 | 116 | */ |
117 | - $meta_keys = (array) apply_filters_deprecated( 'gravityview/data/parse/meta_keys', array( $meta_keys, $post->ID ), '2.0.7', 'gravityview/view_collection/from_post/meta_keys' ); |
|
117 | + $meta_keys = (array)apply_filters_deprecated( 'gravityview/data/parse/meta_keys', array( $meta_keys, $post->ID ), '2.0.7', 'gravityview/view_collection/from_post/meta_keys' ); |
|
118 | 118 | |
119 | 119 | /** What about inside post meta values? */ |
120 | 120 | foreach ( $meta_keys as $meta_key ) { |
@@ -168,12 +168,12 @@ discard block |
||
168 | 168 | |
169 | 169 | /** Let's find us some [gravityview] shortcodes perhaps. */ |
170 | 170 | foreach ( Shortcode::parse( $content ) as $shortcode ) { |
171 | - if ( $shortcode->name != 'gravityview' || empty( $shortcode->atts['id'] ) ) { |
|
171 | + if ( $shortcode->name != 'gravityview' || empty( $shortcode->atts[ 'id' ] ) ) { |
|
172 | 172 | continue; |
173 | 173 | } |
174 | 174 | |
175 | - if ( is_numeric( $shortcode->atts['id'] ) ) { |
|
176 | - $view = View::by_id( $shortcode->atts['id'] ); |
|
175 | + if ( is_numeric( $shortcode->atts[ 'id' ] ) ) { |
|
176 | + $view = View::by_id( $shortcode->atts[ 'id' ] ); |
|
177 | 177 | if ( ! $view ) { |
178 | 178 | continue; |
179 | 179 | } |
@@ -98,15 +98,15 @@ discard block |
||
98 | 98 | $additional = array(); |
99 | 99 | |
100 | 100 | // form-19-table-body.php |
101 | - $additional[] = sprintf( 'form-%d-%s-%s.php', $this->view->form ? $this->view->form->ID : 0, $slug, $name ); |
|
101 | + $additional[ ] = sprintf( 'form-%d-%s-%s.php', $this->view->form ? $this->view->form->ID : 0, $slug, $name ); |
|
102 | 102 | |
103 | 103 | // view-3-table-body.php |
104 | - $additional[] = sprintf( 'view-%d-%s-%s.php', $this->view->ID, $slug, $name ); |
|
104 | + $additional[ ] = sprintf( 'view-%d-%s-%s.php', $this->view->ID, $slug, $name ); |
|
105 | 105 | |
106 | 106 | global $post; |
107 | 107 | if ( $post ) { |
108 | 108 | // page-19-table-body.php |
109 | - $additional[] = sprintf( 'page-%d-%s-%s.php', $post->ID, $slug, $name ); |
|
109 | + $additional[ ] = sprintf( 'page-%d-%s-%s.php', $post->ID, $slug, $name ); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | // Combine with existing table-body.php and table.php |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | ob_start(); |
131 | 131 | |
132 | 132 | $request = new Mock_Request(); |
133 | - $request->returns['is_view'] = $this->view; |
|
133 | + $request->returns[ 'is_view' ] = $this->view; |
|
134 | 134 | |
135 | 135 | /** |
136 | 136 | * You got one shot. One opportunity. To render all the widgets you have ever wanted. |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | */ |
143 | 143 | global $wp_filter; |
144 | 144 | foreach ( array( 'gravityview_before', 'gravityview_after' ) as $hook ) { |
145 | - foreach ( $wp_filter[ $hook ]->callbacks[10] as $function_key => $callback ) { |
|
145 | + foreach ( $wp_filter[ $hook ]->callbacks[ 10 ] as $function_key => $callback ) { |
|
146 | 146 | if ( strpos( $function_key, 'render_widget_hooks' ) ) { |
147 | - unset( $wp_filter[ $hook ]->callbacks[10][ $function_key ] ); |
|
147 | + unset( $wp_filter[ $hook ]->callbacks[ 10 ][ $function_key ] ); |
|
148 | 148 | } |
149 | 149 | } |
150 | 150 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | if ( $this->entry ) { |
156 | 156 | |
157 | - $request->returns['is_entry'] = $this->entry; |
|
157 | + $request->returns[ 'is_entry' ] = $this->entry; |
|
158 | 158 | |
159 | 159 | global $post; |
160 | 160 | |
@@ -188,11 +188,11 @@ discard block |
||
188 | 188 | * This allows us to fake it till we make it. |
189 | 189 | */ |
190 | 190 | $parameters = $this->view->settings->as_atts(); |
191 | - if ( ! empty( $parameters['sort_field'] ) && is_array( $parameters['sort_field'] ) ) { |
|
191 | + if ( ! empty( $parameters[ 'sort_field' ] ) && is_array( $parameters[ 'sort_field' ] ) ) { |
|
192 | 192 | $has_multisort = true; |
193 | - $parameters['sort_field'] = reset( $parameters['sort_field'] ); |
|
194 | - if ( ! empty( $parameters['sort_direction'] ) && is_array( $parameters['sort_direction'] ) ) { |
|
195 | - $parameters['sort_direction'] = reset( $parameters['sort_direction'] ); |
|
193 | + $parameters[ 'sort_field' ] = reset( $parameters[ 'sort_field' ] ); |
|
194 | + if ( ! empty( $parameters[ 'sort_direction' ] ) && is_array( $parameters[ 'sort_direction' ] ) ) { |
|
195 | + $parameters[ 'sort_direction' ] = reset( $parameters[ 'sort_direction' ] ); |
|
196 | 196 | } |
197 | 197 | } |
198 | 198 | |
@@ -211,8 +211,8 @@ discard block |
||
211 | 211 | 'fields' => $this->view->fields->by_visible( $this->view ), |
212 | 212 | 'in_the_loop' => true, |
213 | 213 | ), empty( $parameters ) ? array() : array( |
214 | - 'paging' => $parameters['paging'], |
|
215 | - 'sorting' => $parameters['sorting'], |
|
214 | + 'paging' => $parameters[ 'paging' ], |
|
215 | + 'sorting' => $parameters[ 'sorting' ], |
|
216 | 216 | ), $post ? array( |
217 | 217 | 'post' => $post, |
218 | 218 | ) : array() ) ); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | var $is_searchable = true; |
13 | 13 | |
14 | - var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains'); |
|
14 | + var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' ); |
|
15 | 15 | |
16 | 16 | var $_gf_field_class_name = 'GF_Field_Post_Category'; |
17 | 17 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $entry = GFAPI::get_entry( $entry_id ); |
47 | 47 | $post_id = \GV\Utils::get( $entry, 'post_id' ); |
48 | 48 | |
49 | - if( empty( $post_id ) ) { |
|
49 | + if ( empty( $post_id ) ) { |
|
50 | 50 | return false; |
51 | 51 | } |
52 | 52 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $post_category_fields = GFAPI::get_fields_by_type( $form, 'post_category' ); |
56 | 56 | |
57 | - if( $post_category_fields ) { |
|
57 | + if ( $post_category_fields ) { |
|
58 | 58 | |
59 | 59 | $updated_categories = array(); |
60 | 60 | |
@@ -121,18 +121,18 @@ discard block |
||
121 | 121 | * |
122 | 122 | * @return mixed |
123 | 123 | */ |
124 | - function edit_entry_post_category_choices( $choices, $field, $form_id ) { |
|
124 | + function edit_entry_post_category_choices( $choices, $field, $form_id ) { |
|
125 | 125 | |
126 | - $entry = GravityView_Edit_Entry::getInstance()->instances['render']->get_entry(); |
|
126 | + $entry = GravityView_Edit_Entry::getInstance()->instances[ 'render' ]->get_entry(); |
|
127 | 127 | |
128 | 128 | // $entry['post_id'] should always be set, but we check to make sure. |
129 | - if( $entry && isset( $entry['post_id'] ) && $post_id = $entry['post_id'] ) { |
|
129 | + if ( $entry && isset( $entry[ 'post_id' ] ) && $post_id = $entry[ 'post_id' ] ) { |
|
130 | 130 | |
131 | 131 | $post_categories = wp_get_post_categories( $post_id, array( 'fields' => 'ids' ) ); |
132 | 132 | |
133 | 133 | // Always use the live value |
134 | 134 | foreach ( $choices as &$choice ) { |
135 | - $choice['isSelected'] = in_array( $choice['value'], array_values( $post_categories ) ); |
|
135 | + $choice[ 'isSelected' ] = in_array( $choice[ 'value' ], array_values( $post_categories ) ); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
@@ -141,15 +141,15 @@ discard block |
||
141 | 141 | |
142 | 142 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
143 | 143 | |
144 | - if( 'edit' === $context ) { |
|
144 | + if ( 'edit' === $context ) { |
|
145 | 145 | return $field_options; |
146 | 146 | } |
147 | 147 | |
148 | - $this->add_field_support('dynamic_data', $field_options ); |
|
149 | - $this->add_field_support('link_to_term', $field_options ); |
|
150 | - $this->add_field_support('new_window', $field_options ); |
|
148 | + $this->add_field_support( 'dynamic_data', $field_options ); |
|
149 | + $this->add_field_support( 'link_to_term', $field_options ); |
|
150 | + $this->add_field_support( 'new_window', $field_options ); |
|
151 | 151 | |
152 | - $field_options['new_window']['requires'] = 'link_to_term'; |
|
152 | + $field_options[ 'new_window' ][ 'requires' ] = 'link_to_term'; |
|
153 | 153 | |
154 | 154 | return $field_options; |
155 | 155 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | var $is_searchable = true; |
16 | 16 | |
17 | - var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains'); |
|
17 | + var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' ); |
|
18 | 18 | |
19 | 19 | var $_gf_field_class_name = 'GF_Field_Post_Tags'; |
20 | 20 | |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | |
30 | 30 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
31 | 31 | |
32 | - if( 'edit' === $context ) { |
|
32 | + if ( 'edit' === $context ) { |
|
33 | 33 | return $field_options; |
34 | 34 | } |
35 | 35 | |
36 | - $this->add_field_support('dynamic_data', $field_options ); |
|
37 | - $this->add_field_support('link_to_term', $field_options ); |
|
38 | - $this->add_field_support('new_window', $field_options ); |
|
36 | + $this->add_field_support( 'dynamic_data', $field_options ); |
|
37 | + $this->add_field_support( 'link_to_term', $field_options ); |
|
38 | + $this->add_field_support( 'new_window', $field_options ); |
|
39 | 39 | |
40 | - $field_options['new_window']['requires'] = 'link_to_term'; |
|
40 | + $field_options[ 'new_window' ][ 'requires' ] = 'link_to_term'; |
|
41 | 41 | |
42 | 42 | return $field_options; |
43 | 43 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | if ( 'single' === $context ) { |
36 | - unset( $field_options['new_window'] ); |
|
36 | + unset( $field_options[ 'new_window' ] ); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | return $field_options; |