@@ -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 | |
@@ -22,7 +22,7 @@ discard block |
||
| 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; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $add_options = array(); |
| 34 | 34 | |
| 35 | 35 | if ( $field->field->inputType === 'likert' && $field->field->gsurveyLikertEnableScoring ) { |
| 36 | - $add_options['score'] = array( |
|
| 36 | + $add_options[ 'score' ] = array( |
|
| 37 | 37 | 'type' => 'checkbox', |
| 38 | 38 | 'label' => __( 'Show score', 'gravityview' ), |
| 39 | 39 | 'desc' => __( 'Display likert score as a simple number.', 'gravityview' ), |
@@ -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; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * @see GFCommon::get_field_filter_settings Gravity Forms suggests checkboxes should just be "contains" |
| 14 | 14 | * @var array |
| 15 | 15 | */ |
| 16 | - var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains'); |
|
| 16 | + var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' ); |
|
| 17 | 17 | |
| 18 | 18 | var $is_searchable = true; |
| 19 | 19 | |
@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | // Set the $_field_id var |
| 46 | 46 | $field_options = parent::field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ); |
| 47 | 47 | |
| 48 | - if( $this->is_choice_value_enabled() ) { |
|
| 49 | - $field_options['choice_display'] = array( |
|
| 48 | + if ( $this->is_choice_value_enabled() ) { |
|
| 49 | + $field_options[ 'choice_display' ] = array( |
|
| 50 | 50 | 'type' => 'radio', |
| 51 | 51 | 'value' => 'value', |
| 52 | 52 | 'label' => __( 'What should be displayed:', 'gravityview' ), |