@@ -41,10 +41,10 @@ |
||
| 41 | 41 | |
| 42 | 42 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
| 43 | 43 | |
| 44 | - unset ( $field_options['search_filter'], $field_options['show_as_link'] ); |
|
| 44 | + unset ( $field_options[ 'search_filter' ], $field_options[ 'show_as_link' ] ); |
|
| 45 | 45 | |
| 46 | 46 | // Set the default CSS class to gv-section, which applies a border and top/bottom margin |
| 47 | - $field_options['custom_class']['value'] = 'gv-section'; |
|
| 47 | + $field_options[ 'custom_class' ][ 'value' ] = 'gv-section'; |
|
| 48 | 48 | |
| 49 | 49 | return $field_options; |
| 50 | 50 | } |
@@ -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' ), |
@@ -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 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * @return string If Gravity Flow not found, or entry not processed yet, returns initial value. Otherwise, returns name of workflow step. |
| 42 | 42 | */ |
| 43 | 43 | function modify_entry_value_workflow_current_status_timestamp( $output, $entry, $field_settings, $field ) { |
| 44 | - $timestamp = gform_get_meta( $entry['id'], 'workflow_current_status_timestamp' ); |
|
| 44 | + $timestamp = gform_get_meta( $entry[ 'id' ], 'workflow_current_status_timestamp' ); |
|
| 45 | 45 | |
| 46 | 46 | if ( ! $timestamp ) { |
| 47 | 47 | return $timestamp; |
@@ -47,16 +47,16 @@ |
||
| 47 | 47 | |
| 48 | 48 | foreach ( $shortcodes->get_shortcode_information( 'gravitypdf', $content ) as $shortcode ) { |
| 49 | 49 | // Let's make sure this entry ID is correct for the supplied form |
| 50 | - $form_id = $wpdb->get_var( $wpdb->prepare( "SELECT form_id FROM $table WHERE display_meta LIKE %s", '%"' . $wpdb->esc_like( $shortcode['attr']['id'] ) . '"%' ) ); |
|
| 50 | + $form_id = $wpdb->get_var( $wpdb->prepare( "SELECT form_id FROM $table WHERE display_meta LIKE %s", '%"' . $wpdb->esc_like( $shortcode[ 'attr' ][ 'id' ] ) . '"%' ) ); |
|
| 51 | 51 | |
| 52 | 52 | // Inject the needed entry ID |
| 53 | 53 | $replace = str_replace( |
| 54 | - sprintf( 'entry="%d"', $shortcode['attr']['entry'] ), |
|
| 55 | - sprintf( 'entry="%d"', $context->entry[ $form_id ]['id'] ), |
|
| 56 | - $shortcode['shortcode'] |
|
| 54 | + sprintf( 'entry="%d"', $shortcode[ 'attr' ][ 'entry' ] ), |
|
| 55 | + sprintf( 'entry="%d"', $context->entry[ $form_id ][ 'id' ] ), |
|
| 56 | + $shortcode[ 'shortcode' ] |
|
| 57 | 57 | ); |
| 58 | 58 | |
| 59 | - $content = str_replace( $shortcode['shortcode'], $replace, $content ); |
|
| 59 | + $content = str_replace( $shortcode[ 'shortcode' ], $replace, $content ); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | return $content; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | do_action( 'gravityview_search_widget_fields_before', $this ); |
| 28 | 28 | |
| 29 | - foreach( array_merge( $this->search_fields, $this->permalink_fields ) as $search_field ) { |
|
| 29 | + foreach ( array_merge( $this->search_fields, $this->permalink_fields ) as $search_field ) { |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @action `gravityview_search_widget_field_before` Before each search input is rendered (other than the submit button) |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | do_action( 'gravityview_search_widget_field_before', $this, $search_field ); |
| 37 | 37 | |
| 38 | 38 | $gravityview_view->search_field = $search_field; |
| 39 | - $this->render( 'search-field', $search_field['input'], false ); |
|
| 39 | + $this->render( 'search-field', $search_field[ 'input' ], false ); |
|
| 40 | 40 | |
| 41 | 41 | // show/hide the search button if there are input type fields |
| 42 | - if( !$has_inputs && $search_field['input'] != 'link' ) { |
|
| 42 | + if ( ! $has_inputs && $search_field[ 'input' ] != 'link' ) { |
|
| 43 | 43 | $has_inputs = true; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | do_action( 'gravityview_search_widget_fields_after', $this ); |
| 59 | 59 | |
| 60 | - if( $has_inputs ) { |
|
| 60 | + if ( $has_inputs ) { |
|
| 61 | 61 | $this->render( 'search-field', 'submit', false ); |
| 62 | 62 | } |
| 63 | 63 | ?> |