@@ -193,8 +193,8 @@ discard block |
||
193 | 193 | * @return string Path to XML file |
194 | 194 | */ |
195 | 195 | public function assign_form_xml( $xml = '', $template = '' ) { |
196 | - if ( $this->settings['type'] === 'preset' && ! empty( $this->settings['preset_form'] ) && $this->template_id === $template ) { |
|
197 | - return $this->settings['preset_form']; |
|
196 | + if ( $this->settings[ 'type' ] === 'preset' && ! empty( $this->settings[ 'preset_form' ] ) && $this->template_id === $template ) { |
|
197 | + return $this->settings[ 'preset_form' ]; |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | return $xml; |
@@ -207,8 +207,8 @@ discard block |
||
207 | 207 | * @return string Path to XML file |
208 | 208 | */ |
209 | 209 | public function assign_fields_xml( $xml = '', $template = '' ) { |
210 | - if ( $this->settings['type'] === 'preset' && ! empty( $this->settings['preset_fields'] ) && $this->template_id === $template ) { |
|
211 | - return $this->settings['preset_fields']; |
|
210 | + if ( $this->settings[ 'type' ] === 'preset' && ! empty( $this->settings[ 'preset_fields' ] ) && $this->template_id === $template ) { |
|
211 | + return $this->settings[ 'preset_fields' ]; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | return $xml; |
@@ -226,8 +226,8 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function assign_view_slug( $default, $context ) { |
228 | 228 | |
229 | - if ( ! empty( $this->settings['slug'] ) ) { |
|
230 | - return $this->settings['slug']; |
|
229 | + if ( ! empty( $this->settings[ 'slug' ] ) ) { |
|
230 | + return $this->settings[ 'slug' ]; |
|
231 | 231 | } |
232 | 232 | if ( ! empty( $default ) ) { |
233 | 233 | return $default; |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | * @return void |
245 | 245 | */ |
246 | 246 | public function register_styles() { |
247 | - if ( ! empty( $this->settings['css_source'] ) ) { |
|
248 | - wp_register_style( 'gravityview_style_' . $this->template_id, $this->settings['css_source'], array(), GravityView_Plugin::version, 'all' ); |
|
247 | + if ( ! empty( $this->settings[ 'css_source' ] ) ) { |
|
248 | + wp_register_style( 'gravityview_style_' . $this->template_id, $this->settings[ 'css_source' ], array(), GravityView_Plugin::version, 'all' ); |
|
249 | 249 | } |
250 | 250 | } |
251 | 251 |
@@ -5,4 +5,4 @@ |
||
5 | 5 | * @deprecated 1.7.5 |
6 | 6 | */ |
7 | 7 | |
8 | -include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget.php' ); |
|
8 | +include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget.php' ); |
@@ -14,8 +14,8 @@ |
||
14 | 14 | <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
15 | 15 | <?php |
16 | 16 | |
17 | - foreach( $metaboxes as $metabox ) { |
|
18 | - $class = !isset( $class ) ? 'nav-tab-active' : ''; |
|
17 | + foreach ( $metaboxes as $metabox ) { |
|
18 | + $class = ! isset( $class ) ? 'nav-tab-active' : ''; |
|
19 | 19 | ?> |
20 | 20 | <li class="ui-state-default"> |
21 | 21 | <a class="nav-tab ui-tabs-anchor <?php echo $class; ?>" href="#<?php echo esc_attr( $metabox->id ); ?>"> |
@@ -19,9 +19,9 @@ |
||
19 | 19 | * Loop through the array of registered metaboxes |
20 | 20 | * @var GravityView_Metabox_Tab $metabox |
21 | 21 | */ |
22 | - foreach( $metaboxes as $metabox ) { |
|
22 | + foreach ( $metaboxes as $metabox ) { |
|
23 | 23 | |
24 | - echo '<div id="'.esc_attr( $metabox->id ).'">'; |
|
24 | + echo '<div id="' . esc_attr( $metabox->id ) . '">'; |
|
25 | 25 | |
26 | 26 | $metabox->render( $post ); |
27 | 27 |
@@ -10,12 +10,12 @@ |
||
10 | 10 | |
11 | 11 | function render_input( $override_input = null ) { |
12 | 12 | |
13 | - if( isset( $override_input ) ) { |
|
13 | + if ( isset( $override_input ) ) { |
|
14 | 14 | echo $override_input; |
15 | 15 | return; |
16 | 16 | } |
17 | 17 | |
18 | - $class = !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
18 | + $class = ! empty( $this->field[ 'class' ] ) ? $this->field[ 'class' ] : 'widefat'; |
|
19 | 19 | |
20 | 20 | ?> |
21 | 21 | <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="hidden" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>" /> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | function render_setting( $override_input = NULL ) { |
17 | 17 | |
18 | - if( $this->get_field_left_label() ) { ?> |
|
18 | + if ( $this->get_field_left_label() ) { ?> |
|
19 | 19 | |
20 | 20 | <td scope="row"> |
21 | 21 | <label for="<?php echo $this->get_field_id(); ?>"> |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | function render_input( $override_input = NULL ) { |
45 | - if( isset( $override_input ) ) { |
|
45 | + if ( isset( $override_input ) ) { |
|
46 | 46 | echo $override_input; |
47 | 47 | return; |
48 | 48 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | ?> |
9 | 9 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php |
10 | 10 | |
11 | - echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
|
11 | + echo '<span class="gv-label">' . $this->get_field_label() . '</span>'; |
|
12 | 12 | |
13 | 13 | echo $this->get_tooltip() . $this->get_field_desc(); |
14 | 14 | |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | function render_input( $override_input = null ) { |
23 | - if( isset( $override_input ) ) { |
|
23 | + if ( isset( $override_input ) ) { |
|
24 | 24 | echo $override_input; |
25 | 25 | return; |
26 | 26 | } |
27 | 27 | ?> |
28 | 28 | <select name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>"> |
29 | - <?php foreach( $this->field['options'] as $value => $label ) : ?> |
|
29 | + <?php foreach ( $this->field[ 'options' ] as $value => $label ) : ?> |
|
30 | 30 | <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $this->value, true ); ?>><?php echo esc_html( $label ); ?></option> |
31 | 31 | <?php endforeach; ?> |
32 | 32 | </select> |
@@ -7,4 +7,4 @@ |
||
7 | 7 | |
8 | 8 | $gravityview_view = GravityView_View::getInstance(); |
9 | 9 | $search_field = $gravityview_view->search_field; |
10 | -?><div><input type="hidden" name="<?php echo esc_attr( $search_field['name'] ); ?>" value="<?php echo esc_attr( $search_field['value'] ); ?>"></div> |
|
11 | 10 | \ No newline at end of file |
11 | +?><div><input type="hidden" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $search_field[ 'value' ] ); ?>"></div> |
|
12 | 12 | \ No newline at end of file |
@@ -21,10 +21,10 @@ |
||
21 | 21 | {email_fields} |
22 | 22 | |
23 | 23 | <div class="gv-note-content-container"> |
24 | - <label for="gv-note-content-{entry_slug}" class="screen-reader-text"><?php echo GravityView_Field_Notes::strings('content-label'); ?></label> |
|
24 | + <label for="gv-note-content-{entry_slug}" class="screen-reader-text"><?php echo GravityView_Field_Notes::strings( 'content-label' ); ?></label> |
|
25 | 25 | <textarea name="gv-note-content" id="gv-note-content-{entry_slug}"></textarea> |
26 | 26 | </div> |
27 | 27 | |
28 | - <button type="submit" class="button gv-add-note-submit"><?php echo GravityView_Field_Notes::strings('add-note'); ?></button> |
|
28 | + <button type="submit" class="button gv-add-note-submit"><?php echo GravityView_Field_Notes::strings( 'add-note' ); ?></button> |
|
29 | 29 | </div> |
30 | 30 | </form> |
31 | 31 | \ No newline at end of file |