@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | die; |
17 | 17 | } |
18 | 18 | |
19 | -if( ! class_exists( 'Gamajo_Template_Loader' ) ) { |
|
19 | +if ( ! class_exists( 'Gamajo_Template_Loader' ) ) { |
|
20 | 20 | require( GRAVITYVIEW_DIR . 'includes/lib/class-gamajo-template-loader.php' ); |
21 | 21 | } |
22 | 22 | |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | 'atts' => NULL, |
158 | 158 | ) ); |
159 | 159 | |
160 | - foreach ($atts as $key => $value) { |
|
161 | - if( is_null( $value ) ) { |
|
160 | + foreach ( $atts as $key => $value ) { |
|
161 | + if ( is_null( $value ) ) { |
|
162 | 162 | continue; |
163 | 163 | } |
164 | 164 | $this->{$key} = $value; |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | static function getInstance( $passed_post = NULL ) { |
191 | 191 | |
192 | - if( empty( self::$instance ) ) { |
|
192 | + if ( empty( self::$instance ) ) { |
|
193 | 193 | self::$instance = new self( $passed_post ); |
194 | 194 | } |
195 | 195 | |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function getCurrentField( $key = NULL ) { |
204 | 204 | |
205 | - if( !empty( $key ) ) { |
|
206 | - if( isset( $this->_current_field[ $key ] ) ) { |
|
205 | + if ( ! empty( $key ) ) { |
|
206 | + if ( isset( $this->_current_field[ $key ] ) ) { |
|
207 | 207 | return $this->_current_field[ $key ]; |
208 | 208 | } |
209 | 209 | return NULL; |
@@ -214,16 +214,16 @@ discard block |
||
214 | 214 | |
215 | 215 | public function setCurrentFieldSetting( $key, $value ) { |
216 | 216 | |
217 | - if( !empty( $this->_current_field ) ) { |
|
218 | - $this->_current_field['field_settings'][ $key ] = $value; |
|
217 | + if ( ! empty( $this->_current_field ) ) { |
|
218 | + $this->_current_field[ 'field_settings' ][ $key ] = $value; |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | } |
222 | 222 | |
223 | 223 | public function getCurrentFieldSetting( $key ) { |
224 | - $settings = $this->getCurrentField('field_settings'); |
|
224 | + $settings = $this->getCurrentField( 'field_settings' ); |
|
225 | 225 | |
226 | - if( $settings && !empty( $settings[ $key ] ) ) { |
|
226 | + if ( $settings && ! empty( $settings[ $key ] ) ) { |
|
227 | 227 | return $settings[ $key ]; |
228 | 228 | } |
229 | 229 | |
@@ -254,8 +254,8 @@ discard block |
||
254 | 254 | */ |
255 | 255 | public function getAtts( $key = NULL ) { |
256 | 256 | |
257 | - if( !empty( $key ) ) { |
|
258 | - if( isset( $this->atts[ $key ] ) ) { |
|
257 | + if ( ! empty( $key ) ) { |
|
258 | + if ( isset( $this->atts[ $key ] ) ) { |
|
259 | 259 | return $this->atts[ $key ]; |
260 | 260 | } |
261 | 261 | return NULL; |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | |
322 | 322 | $fields = empty( $this->fields ) ? NULL : $this->fields; |
323 | 323 | |
324 | - if( $fields && !empty( $key ) ) { |
|
324 | + if ( $fields && ! empty( $key ) ) { |
|
325 | 325 | $fields = isset( $fields[ $key ] ) ? $fields[ $key ] : NULL; |
326 | 326 | } |
327 | 327 | |
@@ -339,18 +339,18 @@ discard block |
||
339 | 339 | */ |
340 | 340 | public function getContextFields( $context = '' ) { |
341 | 341 | |
342 | - if( '' === $context ) { |
|
342 | + if ( '' === $context ) { |
|
343 | 343 | $context = $this->getContext(); |
344 | 344 | } |
345 | 345 | |
346 | 346 | $fields = $this->getFields(); |
347 | 347 | |
348 | - foreach ( (array) $fields as $key => $context_fields ) { |
|
348 | + foreach ( (array)$fields as $key => $context_fields ) { |
|
349 | 349 | |
350 | 350 | // Formatted as `{context}_{template id}-{zone name}`, so we want just the $context to match against |
351 | 351 | $matches = explode( '_', $key ); |
352 | 352 | |
353 | - if( isset( $matches[0] ) && $matches[0] === $context ) { |
|
353 | + if ( isset( $matches[ 0 ] ) && $matches[ 0 ] === $context ) { |
|
354 | 354 | return $context_fields; |
355 | 355 | } |
356 | 356 | } |
@@ -371,8 +371,8 @@ discard block |
||
371 | 371 | */ |
372 | 372 | public function getField( $key ) { |
373 | 373 | |
374 | - if( !empty( $key ) ) { |
|
375 | - if( isset( $this->fields[ $key ] ) ) { |
|
374 | + if ( ! empty( $key ) ) { |
|
375 | + if ( isset( $this->fields[ $key ] ) ) { |
|
376 | 376 | return $this->fields[ $key ]; |
377 | 377 | } |
378 | 378 | } |
@@ -478,8 +478,8 @@ discard block |
||
478 | 478 | public function getPaginationCounts() { |
479 | 479 | |
480 | 480 | $paging = $this->getPaging(); |
481 | - $offset = $paging['offset']; |
|
482 | - $page_size = $paging['page_size']; |
|
481 | + $offset = $paging[ 'offset' ]; |
|
482 | + $page_size = $paging[ 'page_size' ]; |
|
483 | 483 | $total = $this->getTotalEntries(); |
484 | 484 | |
485 | 485 | if ( empty( $total ) ) { |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | */ |
501 | 501 | list( $first, $last, $total ) = apply_filters( 'gravityview_pagination_counts', array( $first, $last, $total ) ); |
502 | 502 | |
503 | - return array( 'first' => (int) $first, 'last' => (int) $last, 'total' => (int) $total ); |
|
503 | + return array( 'first' => (int)$first, 'last' => (int)$last, 'total' => (int)$total ); |
|
504 | 504 | } |
505 | 505 | |
506 | 506 | /** |
@@ -591,16 +591,16 @@ discard block |
||
591 | 591 | */ |
592 | 592 | public function getCurrentEntry() { |
593 | 593 | |
594 | - if( in_array( $this->getContext(), array( 'edit', 'single') ) ) { |
|
594 | + if ( in_array( $this->getContext(), array( 'edit', 'single' ) ) ) { |
|
595 | 595 | $entries = $this->getEntries(); |
596 | - $entry = $entries[0]; |
|
596 | + $entry = $entries[ 0 ]; |
|
597 | 597 | } else { |
598 | 598 | $entry = $this->_current_entry; |
599 | 599 | } |
600 | 600 | |
601 | 601 | /** @since 1.16 Fixes DataTables empty entry issue */ |
602 | - if ( empty( $entry ) && ! empty( $this->_current_field['entry'] ) ) { |
|
603 | - $entry = $this->_current_field['entry']; |
|
602 | + if ( empty( $entry ) && ! empty( $this->_current_field[ 'entry' ] ) ) { |
|
603 | + $entry = $this->_current_field[ 'entry' ]; |
|
604 | 604 | } |
605 | 605 | |
606 | 606 | return $entry; |
@@ -637,8 +637,8 @@ discard block |
||
637 | 637 | */ |
638 | 638 | public function renderZone( $zone = '', $atts = array(), $echo = true ) { |
639 | 639 | |
640 | - if( empty( $zone ) ) { |
|
641 | - do_action('gravityview_log_error', 'GravityView_View[renderZone] No zone defined.'); |
|
640 | + if ( empty( $zone ) ) { |
|
641 | + do_action( 'gravityview_log_error', 'GravityView_View[renderZone] No zone defined.' ); |
|
642 | 642 | return NULL; |
643 | 643 | } |
644 | 644 | |
@@ -647,37 +647,37 @@ discard block |
||
647 | 647 | 'context' => $this->getContext(), |
648 | 648 | 'entry' => $this->getCurrentEntry(), |
649 | 649 | 'form' => $this->getForm(), |
650 | - 'hide_empty' => $this->getAtts('hide_empty'), |
|
650 | + 'hide_empty' => $this->getAtts( 'hide_empty' ), |
|
651 | 651 | ); |
652 | 652 | |
653 | 653 | $final_atts = wp_parse_args( $atts, $defaults ); |
654 | 654 | |
655 | 655 | $output = ''; |
656 | 656 | |
657 | - $final_atts['zone_id'] = "{$final_atts['context']}_{$final_atts['slug']}-{$zone}"; |
|
657 | + $final_atts[ 'zone_id' ] = "{$final_atts[ 'context' ]}_{$final_atts[ 'slug' ]}-{$zone}"; |
|
658 | 658 | |
659 | - $fields = $this->getField( $final_atts['zone_id'] ); |
|
659 | + $fields = $this->getField( $final_atts[ 'zone_id' ] ); |
|
660 | 660 | |
661 | 661 | // Backward compatibility |
662 | - if( 'table' === $this->getTemplatePartSlug() ) { |
|
662 | + if ( 'table' === $this->getTemplatePartSlug() ) { |
|
663 | 663 | /** |
664 | 664 | * @filter `gravityview_table_cells` Modify the fields displayed in a table |
665 | 665 | * @param array $fields |
666 | 666 | * @param GravityView_View $this |
667 | 667 | */ |
668 | - $fields = apply_filters("gravityview_table_cells", $fields, $this ); |
|
668 | + $fields = apply_filters( "gravityview_table_cells", $fields, $this ); |
|
669 | 669 | } |
670 | 670 | |
671 | - if( empty( $fields ) ) { |
|
671 | + if ( empty( $fields ) ) { |
|
672 | 672 | |
673 | - do_action('gravityview_log_error', 'GravityView_View[renderZone] Empty View configuration for this context.', $fields ); |
|
673 | + do_action( 'gravityview_log_error', 'GravityView_View[renderZone] Empty View configuration for this context.', $fields ); |
|
674 | 674 | |
675 | 675 | return NULL; |
676 | 676 | } |
677 | 677 | |
678 | 678 | $field_output = ''; |
679 | 679 | foreach ( $fields as $field ) { |
680 | - $final_atts['field'] = $field; |
|
680 | + $final_atts[ 'field' ] = $field; |
|
681 | 681 | |
682 | 682 | $field_output .= gravityview_field_output( $final_atts ); |
683 | 683 | } |
@@ -688,21 +688,21 @@ discard block |
||
688 | 688 | * @since 1.7.6 |
689 | 689 | * @param boolean $hide_empty_zone Default: false |
690 | 690 | */ |
691 | - if( empty( $field_output ) && apply_filters( 'gravityview/render/hide-empty-zone', false ) ) { |
|
691 | + if ( empty( $field_output ) && apply_filters( 'gravityview/render/hide-empty-zone', false ) ) { |
|
692 | 692 | return NULL; |
693 | 693 | } |
694 | 694 | |
695 | - if( !empty( $final_atts['wrapper_class'] ) ) { |
|
696 | - $output .= '<div class="'.gravityview_sanitize_html_class( $final_atts['wrapper_class'] ).'">'; |
|
695 | + if ( ! empty( $final_atts[ 'wrapper_class' ] ) ) { |
|
696 | + $output .= '<div class="' . gravityview_sanitize_html_class( $final_atts[ 'wrapper_class' ] ) . '">'; |
|
697 | 697 | } |
698 | 698 | |
699 | 699 | $output .= $field_output; |
700 | 700 | |
701 | - if( !empty( $final_atts['wrapper_class'] ) ) { |
|
701 | + if ( ! empty( $final_atts[ 'wrapper_class' ] ) ) { |
|
702 | 702 | $output .= '</div>'; |
703 | 703 | } |
704 | 704 | |
705 | - if( $echo ) { |
|
705 | + if ( $echo ) { |
|
706 | 706 | echo $output; |
707 | 707 | } |
708 | 708 | |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | */ |
721 | 721 | function locate_template( $template_names, $load = false, $require_once = true ) { |
722 | 722 | |
723 | - if( is_string( $template_names ) && isset( $this->located_templates[ $template_names ] ) ) { |
|
723 | + if ( is_string( $template_names ) && isset( $this->located_templates[ $template_names ] ) ) { |
|
724 | 724 | |
725 | 725 | $located = $this->located_templates[ $template_names ]; |
726 | 726 | |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | // Set $load to always false so we handle it here. |
730 | 730 | $located = parent::locate_template( $template_names, false, $require_once ); |
731 | 731 | |
732 | - if( is_string( $template_names ) ) { |
|
732 | + if ( is_string( $template_names ) ) { |
|
733 | 733 | $this->located_templates[ $template_names ] = $located; |
734 | 734 | } |
735 | 735 | } |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | * @return mixed|null The stored data. |
748 | 748 | */ |
749 | 749 | public function __get( $name ) { |
750 | - if( isset( $this->{$name} ) ) { |
|
750 | + if ( isset( $this->{$name} ) ) { |
|
751 | 751 | return $this->{$name}; |
752 | 752 | } else { |
753 | 753 | return NULL; |
@@ -776,15 +776,15 @@ discard block |
||
776 | 776 | $additional = array(); |
777 | 777 | |
778 | 778 | // form-19-table-body.php |
779 | - $additional[] = sprintf( 'form-%d-%s-%s.php', $this->getFormId(), $slug, $name ); |
|
779 | + $additional[ ] = sprintf( 'form-%d-%s-%s.php', $this->getFormId(), $slug, $name ); |
|
780 | 780 | |
781 | 781 | // view-3-table-body.php |
782 | - $additional[] = sprintf( 'view-%d-%s-%s.php', $this->getViewId(), $slug, $name ); |
|
782 | + $additional[ ] = sprintf( 'view-%d-%s-%s.php', $this->getViewId(), $slug, $name ); |
|
783 | 783 | |
784 | - if( $this->getPostId() ) { |
|
784 | + if ( $this->getPostId() ) { |
|
785 | 785 | |
786 | 786 | // page-19-table-body.php |
787 | - $additional[] = sprintf( 'page-%d-%s-%s.php', $this->getPostId(), $slug, $name ); |
|
787 | + $additional[ ] = sprintf( 'page-%d-%s-%s.php', $this->getPostId(), $slug, $name ); |
|
788 | 788 | } |
789 | 789 | |
790 | 790 | // Combine with existing table-body.php and table.php |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | |
807 | 807 | do_action( 'gravityview_log_debug', '[render] Rendering Template File', $template_file ); |
808 | 808 | |
809 | - if( !empty( $template_file) ) { |
|
809 | + if ( ! empty( $template_file ) ) { |
|
810 | 810 | |
811 | 811 | if ( $require_once ) { |
812 | 812 | require_once( $template_file ); |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | */ |
824 | 824 | public function render_widget_hooks( $view_id ) { |
825 | 825 | |
826 | - if( empty( $view_id ) || 'single' == gravityview_get_context() ) { |
|
826 | + if ( empty( $view_id ) || 'single' == gravityview_get_context() ) { |
|
827 | 827 | do_action( 'gravityview_log_debug', __METHOD__ . ' - Not rendering widgets; single entry' ); |
828 | 828 | return; |
829 | 829 | } |
@@ -831,9 +831,9 @@ discard block |
||
831 | 831 | $view_data = gravityview_get_current_view_data( $view_id ); |
832 | 832 | |
833 | 833 | // get View widget configuration |
834 | - $widgets = (array)$view_data['widgets']; |
|
834 | + $widgets = (array)$view_data[ 'widgets' ]; |
|
835 | 835 | |
836 | - switch( current_filter() ) { |
|
836 | + switch ( current_filter() ) { |
|
837 | 837 | default: |
838 | 838 | case 'gravityview_before': |
839 | 839 | $zone = 'header'; |
@@ -847,9 +847,9 @@ discard block |
||
847 | 847 | * Filter widgets not in the current zone |
848 | 848 | * @since 1.16 |
849 | 849 | */ |
850 | - foreach( $widgets as $key => $widget ) { |
|
850 | + foreach ( $widgets as $key => $widget ) { |
|
851 | 851 | // The widget isn't in the current zone |
852 | - if( false === strpos( $key, $zone ) ) { |
|
852 | + if ( false === strpos( $key, $zone ) ) { |
|
853 | 853 | unset( $widgets[ $key ] ); |
854 | 854 | } |
855 | 855 | } |
@@ -864,8 +864,8 @@ discard block |
||
864 | 864 | } |
865 | 865 | |
866 | 866 | // Prevent being called twice |
867 | - if( did_action( $zone.'_'.$view_id.'_widgets' ) ) { |
|
868 | - do_action( 'gravityview_log_debug', sprintf( '%s - Not rendering %s; already rendered', __METHOD__ , $zone.'_'.$view_id.'_widgets' ) ); |
|
867 | + if ( did_action( $zone . '_' . $view_id . '_widgets' ) ) { |
|
868 | + do_action( 'gravityview_log_debug', sprintf( '%s - Not rendering %s; already rendered', __METHOD__, $zone . '_' . $view_id . '_widgets' ) ); |
|
869 | 869 | return; |
870 | 870 | } |
871 | 871 | |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | |
877 | 877 | $default_css_class = 'gv-grid gv-widgets-' . $zone; |
878 | 878 | |
879 | - if( 0 === GravityView_View::getInstance()->getTotalEntries() ) { |
|
879 | + if ( 0 === GravityView_View::getInstance()->getTotalEntries() ) { |
|
880 | 880 | $default_css_class .= ' gv-widgets-no-results'; |
881 | 881 | } |
882 | 882 | |
@@ -887,7 +887,7 @@ discard block |
||
887 | 887 | * @param string $zone Current widget zone, either `header` or `footer` |
888 | 888 | * @param array $widgets Array of widget configurations for the current zone, as set by `gravityview_get_current_view_data()['widgets']` |
889 | 889 | */ |
890 | - $css_class = apply_filters('gravityview/widgets/wrapper_css_class', $default_css_class, $zone, $widgets ); |
|
890 | + $css_class = apply_filters( 'gravityview/widgets/wrapper_css_class', $default_css_class, $zone, $widgets ); |
|
891 | 891 | |
892 | 892 | $css_class = gravityview_sanitize_html_class( $css_class ); |
893 | 893 | |
@@ -895,17 +895,17 @@ discard block |
||
895 | 895 | ?> |
896 | 896 | <div class="<?php echo $css_class; ?>"> |
897 | 897 | <?php |
898 | - foreach( $rows as $row ) { |
|
899 | - foreach( $row as $col => $areas ) { |
|
900 | - $column = ($col == '2-2') ? '1-2 gv-right' : $col.' gv-left'; |
|
898 | + foreach ( $rows as $row ) { |
|
899 | + foreach ( $row as $col => $areas ) { |
|
900 | + $column = ( $col == '2-2' ) ? '1-2 gv-right' : $col . ' gv-left'; |
|
901 | 901 | ?> |
902 | 902 | <div class="gv-grid-col-<?php echo esc_attr( $column ); ?>"> |
903 | 903 | <?php |
904 | - if( !empty( $areas ) ) { |
|
905 | - foreach( $areas as $area ) { |
|
906 | - if( !empty( $widgets[ $zone .'_'. $area['areaid'] ] ) ) { |
|
907 | - foreach( $widgets[ $zone .'_'. $area['areaid'] ] as $widget ) { |
|
908 | - do_action( "gravityview_render_widget_{$widget['id']}", $widget ); |
|
904 | + if ( ! empty( $areas ) ) { |
|
905 | + foreach ( $areas as $area ) { |
|
906 | + if ( ! empty( $widgets[ $zone . '_' . $area[ 'areaid' ] ] ) ) { |
|
907 | + foreach ( $widgets[ $zone . '_' . $area[ 'areaid' ] ] as $widget ) { |
|
908 | + do_action( "gravityview_render_widget_{$widget[ 'id' ]}", $widget ); |
|
909 | 909 | } |
910 | 910 | } |
911 | 911 | } |
@@ -921,8 +921,8 @@ discard block |
||
921 | 921 | * Prevent widgets from being called twice. |
922 | 922 | * Checking for loop_start prevents themes and plugins that pre-process shortcodes from triggering the action before displaying. Like, ahem, the Divi theme and WordPress SEO plugin |
923 | 923 | */ |
924 | - if( did_action( 'wp_head' ) ) { |
|
925 | - do_action( $zone.'_'.$view_id.'_widgets' ); |
|
924 | + if ( did_action( 'wp_head' ) ) { |
|
925 | + do_action( $zone . '_' . $view_id . '_widgets' ); |
|
926 | 926 | } |
927 | 927 | } |
928 | 928 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | $this->label = esc_attr__( 'Approve Entries', 'gravityview' ); |
24 | 24 | |
25 | - $this->description = esc_attr__( 'Approve and reject entries from the View.', 'gravityview' ); |
|
25 | + $this->description = esc_attr__( 'Approve and reject entries from the View.', 'gravityview' ); |
|
26 | 26 | |
27 | 27 | $this->add_hooks(); |
28 | 28 | |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | */ |
45 | 45 | function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) { |
46 | 46 | |
47 | - unset( $field_options['only_loggedin'] ); |
|
47 | + unset( $field_options[ 'only_loggedin' ] ); |
|
48 | 48 | |
49 | - unset( $field_options['new_window'] ); |
|
49 | + unset( $field_options[ 'new_window' ] ); |
|
50 | 50 | |
51 | - unset( $field_options['show_as_link'] ); |
|
51 | + unset( $field_options[ 'show_as_link' ] ); |
|
52 | 52 | |
53 | 53 | return $field_options; |
54 | 54 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | add_action( 'gravityview/field/approval/load_scripts', array( $this, 'enqueue_and_localize_script' ) ); |
70 | 70 | |
71 | - add_action( 'gravityview_datatables_scripts_styles', array( $this, 'enqueue_and_localize_script' ) ); |
|
71 | + add_action( 'gravityview_datatables_scripts_styles', array( $this, 'enqueue_and_localize_script' ) ); |
|
72 | 72 | |
73 | 73 | add_filter( 'gravityview_get_entries', array( $this, 'modify_search_parameters' ), 1000 ); |
74 | 74 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | public function maybe_prevent_field_render( $html, $args ) { |
89 | 89 | |
90 | 90 | // If the field is `entry_approval` type but the user doesn't have the moderate entries cap, don't render. |
91 | - if( $this->name === rgar( $args['field'], 'id' ) && ! GVCommon::has_cap('gravityview_moderate_entries') ) { |
|
91 | + if ( $this->name === rgar( $args[ 'field' ], 'id' ) && ! GVCommon::has_cap( 'gravityview_moderate_entries' ) ) { |
|
92 | 92 | return ''; |
93 | 93 | } |
94 | 94 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function modify_search_parameters( $parameters ) { |
106 | 106 | |
107 | - if( $this->name === rgars( $parameters, 'sorting/key' ) ) { |
|
108 | - $parameters['sorting']['key'] = 'is_approved'; |
|
107 | + if ( $this->name === rgars( $parameters, 'sorting/key' ) ) { |
|
108 | + $parameters[ 'sorting' ][ 'key' ] = 'is_approved'; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | return $parameters; |
@@ -121,18 +121,18 @@ discard block |
||
121 | 121 | function register_scripts_and_styles() { |
122 | 122 | $script_debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; |
123 | 123 | |
124 | - wp_register_script( 'gravityview-field-approval', GRAVITYVIEW_URL . 'assets/js/field-approval'.$script_debug.'.js', array( 'jquery' ), GravityView_Plugin::version, true ); |
|
124 | + wp_register_script( 'gravityview-field-approval', GRAVITYVIEW_URL . 'assets/js/field-approval' . $script_debug . '.js', array( 'jquery' ), GravityView_Plugin::version, true ); |
|
125 | 125 | |
126 | 126 | $style_path = GRAVITYVIEW_DIR . 'templates/css/field-approval.css'; |
127 | 127 | |
128 | - if( class_exists( 'GravityView_View' ) ) { |
|
128 | + if ( class_exists( 'GravityView_View' ) ) { |
|
129 | 129 | /** |
130 | 130 | * Override CSS file by placing in your theme's /gravityview/css/ sub-directory. |
131 | 131 | */ |
132 | 132 | $style_path = GravityView_View::getInstance()->locate_template( 'css/field-approval.css', false ); |
133 | 133 | } |
134 | 134 | |
135 | - $style_url = plugins_url( 'css/field-approval.css', trailingslashit( dirname( $style_path ) ) ); |
|
135 | + $style_url = plugins_url( 'css/field-approval.css', trailingslashit( dirname( $style_path ) ) ); |
|
136 | 136 | |
137 | 137 | /** |
138 | 138 | * @filter `gravityview/field/approval/css_url` URL to the Approval field CSS file. |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | $style_url = apply_filters( 'gravityview/field/approval/css_url', $style_url ); |
143 | 143 | |
144 | - if( ! empty( $style_url ) ) { |
|
144 | + if ( ! empty( $style_url ) ) { |
|
145 | 145 | wp_register_style( 'gravityview-field-approval', $style_url, array( 'dashicons' ), GravityView_Plugin::version, 'screen' ); |
146 | 146 | } |
147 | 147 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | public function enqueue_and_localize_script() { |
157 | 157 | |
158 | 158 | // The script is already registered and enqueued |
159 | - if( wp_script_is( 'gravityview-field-approval', 'enqueued' ) ) { |
|
159 | + if ( wp_script_is( 'gravityview-field-approval', 'enqueued' ) ) { |
|
160 | 160 | return; |
161 | 161 | } |
162 | 162 | |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | |
167 | 167 | wp_localize_script( 'gravityview-field-approval', 'gvApproval', array( |
168 | 168 | 'ajaxurl' => admin_url( 'admin-ajax.php' ), |
169 | - 'nonce' => wp_create_nonce('gravityview_entry_approval'), |
|
169 | + 'nonce' => wp_create_nonce( 'gravityview_entry_approval' ), |
|
170 | 170 | 'status' => GravityView_Entry_Approval_Status::get_all(), |
171 | - )); |
|
171 | + ) ); |
|
172 | 172 | |
173 | 173 | } |
174 | 174 | |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public function filter_gravityview_entry_default_field( $entry_default_fields, $form, $context ) { |
187 | 187 | |
188 | - if ( ! isset( $entry_default_fields["{$this->name}"] ) && 'edit' !== $context ) { |
|
189 | - $entry_default_fields["{$this->name}"] = array( |
|
188 | + if ( ! isset( $entry_default_fields[ "{$this->name}" ] ) && 'edit' !== $context ) { |
|
189 | + $entry_default_fields[ "{$this->name}" ] = array( |
|
190 | 190 | 'label' => $this->label, |
191 | 191 | 'desc' => $this->description, |
192 | 192 | 'type' => $this->name, |
@@ -107,9 +107,9 @@ discard block |
||
107 | 107 | ) ); |
108 | 108 | |
109 | 109 | // This is just HTML we don't need. |
110 | - unset( $response['message'] ); |
|
110 | + unset( $response[ 'message' ] ); |
|
111 | 111 | |
112 | - switch ( intval( $response['license_limit'] ) ) { |
|
112 | + switch ( intval( $response[ 'license_limit' ] ) ) { |
|
113 | 113 | case 1: |
114 | 114 | $package = 'Sol'; |
115 | 115 | break; |
@@ -120,24 +120,24 @@ discard block |
||
120 | 120 | $package = 'Interstellar'; |
121 | 121 | break; |
122 | 122 | default: |
123 | - $package = sprintf( '%d-Site License', $response['license_limit'] ); |
|
123 | + $package = sprintf( '%d-Site License', $response[ 'license_limit' ] ); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | $data = array( |
127 | 127 | 'email' => GravityView_Settings::getSetting( 'support-email' ), |
128 | - 'name' => $response['customer_name'], |
|
129 | - 'Valid License?' => ucwords( $response['license'] ), |
|
130 | - 'License Key' => $response['license_key'], |
|
128 | + 'name' => $response[ 'customer_name' ], |
|
129 | + 'Valid License?' => ucwords( $response[ 'license' ] ), |
|
130 | + 'License Key' => $response[ 'license_key' ], |
|
131 | 131 | 'License Level' => $package, |
132 | 132 | 'Site Admin Email' => get_bloginfo( 'admin_email' ), |
133 | 133 | 'Support Email' => GravityView_Settings::getSetting( 'support-email' ), |
134 | - 'License Limit' => $response['license_limit'], |
|
135 | - 'Site Count' => $response['site_count'], |
|
136 | - 'License Expires' => $response['expires'], |
|
137 | - 'Activations Left' => $response['activations_left'], |
|
138 | - 'Payment ID' => $response['payment_id'], |
|
139 | - 'Payment Name' => $response['customer_name'], |
|
140 | - 'Payment Email' => $response['customer_email'], |
|
134 | + 'License Limit' => $response[ 'license_limit' ], |
|
135 | + 'Site Count' => $response[ 'site_count' ], |
|
136 | + 'License Expires' => $response[ 'expires' ], |
|
137 | + 'Activations Left' => $response[ 'activations_left' ], |
|
138 | + 'Payment ID' => $response[ 'payment_id' ], |
|
139 | + 'Payment Name' => $response[ 'customer_name' ], |
|
140 | + 'Payment Email' => $response[ 'customer_email' ], |
|
141 | 141 | 'WordPress Version' => get_bloginfo( 'version', 'display' ), |
142 | 142 | 'PHP Version' => phpversion(), |
143 | 143 | 'GravityView Version' => GravityView_Plugin::version, |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | function field_options( $field_options, $template_id, $field_id, $context, $input_type ) { |
42 | 42 | |
43 | - unset ( $field_options['search_filter'], $field_options['show_as_link'] ); |
|
43 | + unset ( $field_options[ 'search_filter' ], $field_options[ 'show_as_link' ] ); |
|
44 | 44 | |
45 | 45 | $new_fields = array( |
46 | 46 | 'content' => array( |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | ), |
61 | 61 | ); |
62 | 62 | |
63 | - if( 'edit' === $context ) { |
|
64 | - unset( $field_options['custom_label'], $field_options['show_label'], $field_options['allow_edit_cap'], $new_fields['wpautop'] ); |
|
63 | + if ( 'edit' === $context ) { |
|
64 | + unset( $field_options[ 'custom_label' ], $field_options[ 'show_label' ], $field_options[ 'allow_edit_cap' ], $new_fields[ 'wpautop' ] ); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | return $new_fields + $field_options; |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | |
96 | 96 | // Loop through the configured Edit Entry fields and add Custom Content fields if there are any |
97 | 97 | // TODO: Make this available to other custom GV field types |
98 | - foreach ( (array) $edit_fields as $edit_field ) { |
|
98 | + foreach ( (array)$edit_fields as $edit_field ) { |
|
99 | 99 | |
100 | - if( 'custom' === rgar( $edit_field, 'id') ) { |
|
100 | + if ( 'custom' === rgar( $edit_field, 'id' ) ) { |
|
101 | 101 | |
102 | 102 | $field_data = array( |
103 | 103 | 'label' => rgar( $edit_field, 'custom_label' ), |
@@ -110,13 +110,13 @@ discard block |
||
110 | 110 | $field_data[ $key ] = GravityView_Merge_Tags::replace_variables( $field_datum, $form, $entry, false, false ); |
111 | 111 | } |
112 | 112 | |
113 | - $field_data['cssClass'] = rgar( $edit_field, 'custom_class' ); |
|
113 | + $field_data[ 'cssClass' ] = rgar( $edit_field, 'custom_class' ); |
|
114 | 114 | |
115 | - $new_fields[] = new GF_Field_HTML( $field_data ); |
|
115 | + $new_fields[ ] = new GF_Field_HTML( $field_data ); |
|
116 | 116 | |
117 | 117 | } else { |
118 | - if( isset( $fields[ $i ] ) ) { |
|
119 | - $new_fields[] = $fields[ $i ]; |
|
118 | + if ( isset( $fields[ $i ] ) ) { |
|
119 | + $new_fields[ ] = $fields[ $i ]; |
|
120 | 120 | } |
121 | 121 | $i++; |
122 | 122 | } |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | |
66 | 66 | $atts = wp_parse_args( $atts, $defaults ); |
67 | 67 | |
68 | - foreach( $atts as $key => $val ) { |
|
68 | + foreach ( $atts as $key => $val ) { |
|
69 | 69 | $this->{$key} = $val; |
70 | 70 | } |
71 | 71 | |
72 | - $this->class = !empty( $this->class ) ? esc_attr( implode( ' ', (array)$this->class ) ) : $this->class; |
|
72 | + $this->class = ! empty( $this->class ) ? esc_attr( implode( ' ', (array)$this->class ) ) : $this->class; |
|
73 | 73 | |
74 | 74 | $this->set_image_size(); |
75 | 75 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | function validate_image_src() { |
87 | 87 | |
88 | - if ( !$this->validate_src ) { return true; } |
|
88 | + if ( ! $this->validate_src ) { return true; } |
|
89 | 89 | |
90 | 90 | $info = pathinfo( $this->src ); |
91 | 91 | |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | * @filter `gravityview_image_extensions` Extensions that GravityView recognizes as valid images to be shown in an `img` tag |
94 | 94 | * @param array $image_exts Default: `['jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico']` |
95 | 95 | */ |
96 | - $image_exts = apply_filters( 'gravityview_image_extensions', array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico' )); |
|
96 | + $image_exts = apply_filters( 'gravityview_image_extensions', array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico' ) ); |
|
97 | 97 | |
98 | - return isset( $info['extension'] ) && in_array( strtolower( $info['extension'] ), $image_exts); |
|
98 | + return isset( $info[ 'extension' ] ) && in_array( strtolower( $info[ 'extension' ] ), $image_exts ); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -111,16 +111,16 @@ discard block |
||
111 | 111 | |
112 | 112 | // And there is no string size passed |
113 | 113 | // And we want to get the image size using PHP |
114 | - if ( empty( $string ) && !empty( $this->getimagesize ) ) { |
|
114 | + if ( empty( $string ) && ! empty( $this->getimagesize ) ) { |
|
115 | 115 | |
116 | 116 | $image_size = @getimagesize( $this->src ); |
117 | 117 | |
118 | 118 | // If it didn't return a response, it may be a HTTPS/SSL error |
119 | - if ( empty( $image_size[0] ) ) { |
|
119 | + if ( empty( $image_size[ 0 ] ) ) { |
|
120 | 120 | $image_size = @getimagesize( set_url_scheme( $this->src, 'http' ) ); |
121 | 121 | } |
122 | 122 | |
123 | - if ( !empty( $image_size ) ) { |
|
123 | + if ( ! empty( $image_size ) ) { |
|
124 | 124 | list( $width, $height ) = $image_size; |
125 | 125 | } |
126 | 126 | |
@@ -133,33 +133,33 @@ discard block |
||
133 | 133 | * @param array $image_sizes Array of image sizes with the key being the size slug, and the value being an array with `width` and `height` defined, in pixels |
134 | 134 | */ |
135 | 135 | $image_sizes = apply_filters( 'gravityview_image_sizes', array( |
136 | - 'tiny' => array('width' => 40, 'height' => 30), |
|
137 | - 'small' => array('width' => 100, 'height' => 75), |
|
138 | - 'medium' => array('width' => 250, 'height' => 188), |
|
139 | - 'large' => array('width' => 448, 'height' => 336), |
|
136 | + 'tiny' => array( 'width' => 40, 'height' => 30 ), |
|
137 | + 'small' => array( 'width' => 100, 'height' => 75 ), |
|
138 | + 'medium' => array( 'width' => 250, 'height' => 188 ), |
|
139 | + 'large' => array( 'width' => 448, 'height' => 336 ), |
|
140 | 140 | ) ); |
141 | 141 | |
142 | - switch( $this->size ) { |
|
142 | + switch ( $this->size ) { |
|
143 | 143 | case 'tiny': |
144 | - extract($image_sizes['tiny']); |
|
144 | + extract( $image_sizes[ 'tiny' ] ); |
|
145 | 145 | break; |
146 | 146 | case 'small': |
147 | 147 | case 's': |
148 | 148 | case 'thumb': |
149 | - extract($image_sizes['small']); |
|
149 | + extract( $image_sizes[ 'small' ] ); |
|
150 | 150 | break; |
151 | 151 | case 'm': |
152 | 152 | case 'medium': |
153 | - extract($image_sizes['medium']); |
|
153 | + extract( $image_sizes[ 'medium' ] ); |
|
154 | 154 | break; |
155 | 155 | case 'large': |
156 | 156 | case 'l': |
157 | - extract($image_sizes['large']); |
|
157 | + extract( $image_sizes[ 'large' ] ); |
|
158 | 158 | break; |
159 | 159 | default: |
160 | 160 | // Verify that the passed sizes are integers. |
161 | - $width = !empty( $width ) ? intval( $width ) : intval( $this->width ); |
|
162 | - $height = !empty( $height ) ? intval( $height ) : intval( $this->height ); |
|
161 | + $width = ! empty( $width ) ? intval( $width ) : intval( $this->width ); |
|
162 | + $height = ! empty( $height ) ? intval( $height ) : intval( $this->height ); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | } |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | |
59 | 59 | if ( 'address' === rgar( $search_field, 'type' ) ) { |
60 | 60 | |
61 | - $field_id = intval( floor( $search_field['key'] ) ); |
|
62 | - $input_id = gravityview_get_input_id_from_id( $search_field['key'] ); |
|
61 | + $field_id = intval( floor( $search_field[ 'key' ] ) ); |
|
62 | + $input_id = gravityview_get_input_id_from_id( $search_field[ 'key' ] ); |
|
63 | 63 | $form = GravityView_View::getInstance()->getForm(); |
64 | 64 | |
65 | 65 | /** @var GF_Field_Address $address_field */ |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $choices = array(); |
69 | 69 | |
70 | 70 | $method_name = 'get_choices_' . self::get_input_type_from_input_id( $input_id ); |
71 | - if( method_exists( $this, $method_name ) ) { |
|
71 | + if ( method_exists( $this, $method_name ) ) { |
|
72 | 72 | /** |
73 | 73 | * @uses GravityView_Field_Address::get_choices_country() |
74 | 74 | * @uses GravityView_Field_Address::get_choices_state() |
@@ -76,12 +76,12 @@ discard block |
||
76 | 76 | $choices = $this->{$method_name}( $address_field ); |
77 | 77 | } |
78 | 78 | |
79 | - if( ! empty( $choices ) ) { |
|
80 | - $search_field['choices'] = $choices; |
|
81 | - $search_field['type'] = rgar( $search_field, 'input'); |
|
79 | + if ( ! empty( $choices ) ) { |
|
80 | + $search_field[ 'choices' ] = $choices; |
|
81 | + $search_field[ 'type' ] = rgar( $search_field, 'input' ); |
|
82 | 82 | } else { |
83 | - $search_field['type'] = 'text'; |
|
84 | - $search_field['input'] = 'input_text'; |
|
83 | + $search_field[ 'type' ] = 'text'; |
|
84 | + $search_field[ 'input' ] = 'input_text'; |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $country_choices = array(); |
108 | 108 | |
109 | 109 | foreach ( $countries as $key => $country ) { |
110 | - $country_choices[] = array( |
|
110 | + $country_choices[ ] = array( |
|
111 | 111 | 'value' => $country, |
112 | 112 | 'text' => $country, |
113 | 113 | ); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | private function get_choices_state( $address_field ) { |
133 | 133 | |
134 | - $address_type = empty( $address_field->addressType ) ? $address_field->get_default_address_type( $form['id'] ) : $address_field->addressType; |
|
134 | + $address_type = empty( $address_field->addressType ) ? $address_field->get_default_address_type( $form[ 'id' ] ) : $address_field->addressType; |
|
135 | 135 | |
136 | 136 | $state_choices = array(); |
137 | 137 | |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | $states = GFCommon::get_canadian_provinces(); |
144 | 144 | break; |
145 | 145 | default: |
146 | - $states = empty( $address_types[ $address_type ]['states'] ) ? array() : $address_types[ $address_type ]['states']; |
|
146 | + $states = empty( $address_types[ $address_type ][ 'states' ] ) ? array() : $address_types[ $address_type ][ 'states' ]; |
|
147 | 147 | break; |
148 | 148 | } |
149 | 149 | |
150 | 150 | foreach ( $states as $key => $state ) { |
151 | - $state_choices[] = array( |
|
151 | + $state_choices[ ] = array( |
|
152 | 152 | 'value' => $state, |
153 | 153 | 'text' => $state, |
154 | 154 | ); |
@@ -171,13 +171,13 @@ discard block |
||
171 | 171 | // Use the same inputs as the "text" input type allows |
172 | 172 | $text_inputs = rgar( $input_types, 'text' ); |
173 | 173 | |
174 | - $input_types['street'] = $text_inputs; |
|
175 | - $input_types['street2'] = $text_inputs; |
|
176 | - $input_types['city'] = $text_inputs; |
|
174 | + $input_types[ 'street' ] = $text_inputs; |
|
175 | + $input_types[ 'street2' ] = $text_inputs; |
|
176 | + $input_types[ 'city' ] = $text_inputs; |
|
177 | 177 | |
178 | - $input_types['state'] = array( 'select', 'radio', 'link' ) + $text_inputs; |
|
179 | - $input_types['zip'] = array( 'input_text' ); |
|
180 | - $input_types['country'] = array( 'select', 'radio', 'link' ) + $text_inputs; |
|
178 | + $input_types[ 'state' ] = array( 'select', 'radio', 'link' ) + $text_inputs; |
|
179 | + $input_types[ 'zip' ] = array( 'input_text' ); |
|
180 | + $input_types[ 'country' ] = array( 'select', 'radio', 'link' ) + $text_inputs; |
|
181 | 181 | |
182 | 182 | return $input_types; |
183 | 183 | } |
@@ -198,10 +198,10 @@ discard block |
||
198 | 198 | // Is this search field for an input (eg: 4.2) or the whole address field (eg: 4)? |
199 | 199 | $input_id = gravityview_get_input_id_from_id( $field_id ); |
200 | 200 | |
201 | - if( 'address' === $field_type && $input_id ) { |
|
201 | + if ( 'address' === $field_type && $input_id ) { |
|
202 | 202 | |
203 | 203 | // If the input ID matches an expected address input, set to that. Otherwise, keep existing input type. |
204 | - if( $address_field_name = self::get_input_type_from_input_id( $input_id ) ) { |
|
204 | + if ( $address_field_name = self::get_input_type_from_input_id( $input_id ) ) { |
|
205 | 205 | $input_type = $address_field_name; |
206 | 206 | } |
207 | 207 | } |
@@ -250,20 +250,20 @@ discard block |
||
250 | 250 | function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) { |
251 | 251 | |
252 | 252 | // If this is NOT the full address field, return default options. |
253 | - if( floor( $field_id ) !== floatval( $field_id ) ) { |
|
253 | + if ( floor( $field_id ) !== floatval( $field_id ) ) { |
|
254 | 254 | return $field_options; |
255 | 255 | } |
256 | 256 | |
257 | - if( 'edit' === $context ) { |
|
257 | + if ( 'edit' === $context ) { |
|
258 | 258 | return $field_options; |
259 | 259 | } |
260 | 260 | |
261 | 261 | $add_options = array(); |
262 | 262 | |
263 | - $add_options['show_map_link'] = array( |
|
263 | + $add_options[ 'show_map_link' ] = array( |
|
264 | 264 | 'type' => 'checkbox', |
265 | 265 | 'label' => __( 'Show Map Link:', 'gravityview' ), |
266 | - 'desc' => __('Display a "Map It" link below the address', 'gravityview'), |
|
266 | + 'desc' => __( 'Display a "Map It" link below the address', 'gravityview' ), |
|
267 | 267 | 'value' => true, |
268 | 268 | 'merge_tags' => false, |
269 | 269 | ); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | var $is_numeric = true; |
16 | 16 | |
17 | - var $search_operators = array( 'is', 'isnot', 'starts_with', 'ends_with' ); |
|
17 | + var $search_operators = array( 'is', 'isnot', 'starts_with', 'ends_with' ); |
|
18 | 18 | |
19 | 19 | var $group = 'pricing'; |
20 | 20 |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | $field_options = parent::field_options( $field_options, $template_id, $field_id, $context, $input_type ); |
46 | 46 | |
47 | 47 | // It's not the parent field; it's an input |
48 | - if( floor( $field_id ) !== floatval( $field_id ) ) { |
|
48 | + if ( floor( $field_id ) !== floatval( $field_id ) ) { |
|
49 | 49 | |
50 | - if( $this->is_choice_value_enabled() ) { |
|
50 | + if ( $this->is_choice_value_enabled() ) { |
|
51 | 51 | |
52 | 52 | $desc = esc_html__( 'This input has a label and a value. What should be displayed?', 'gravityview' ); |
53 | 53 | $default = 'value'; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ); |
66 | 66 | } |
67 | 67 | |
68 | - $field_options['choice_display'] = array( |
|
68 | + $field_options[ 'choice_display' ] = array( |
|
69 | 69 | 'type' => 'radio', |
70 | 70 | 'class' => 'vertical', |
71 | 71 | 'label' => __( 'What should be displayed:', 'gravityview' ), |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | function clear_product_info_cache( $form = array(), $entry_id = 0, $Edit_Entry_Render = null ) { |
51 | 51 | |
52 | - if( $this->should_hide_product_fields( $Edit_Entry_Render->entry ) ) { |
|
52 | + if ( $this->should_hide_product_fields( $Edit_Entry_Render->entry ) ) { |
|
53 | 53 | return; |
54 | 54 | } |
55 | 55 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @see GVCommon::entry_has_transaction_data() |
102 | 102 | * @param boolean $hide_product_fields Whether to hide product fields in the editor. Uses $entry data to determine. |
103 | 103 | */ |
104 | - $hide_product_fields = (bool) apply_filters( 'gravityview/edit_entry/hide-product-fields', $has_transaction_data ); |
|
104 | + $hide_product_fields = (bool)apply_filters( 'gravityview/edit_entry/hide-product-fields', $has_transaction_data ); |
|
105 | 105 | |
106 | 106 | return $hide_product_fields; |
107 | 107 | } |