@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | function __construct() { |
19 | 19 | |
20 | - $this->widget_description = __('Insert custom text or HTML as a widget', 'gravityview' ); |
|
20 | + $this->widget_description = __( 'Insert custom text or HTML as a widget', 'gravityview' ); |
|
21 | 21 | |
22 | 22 | $default_values = array( |
23 | 23 | 'header' => 1, |
@@ -42,39 +42,39 @@ discard block |
||
42 | 42 | ), |
43 | 43 | ); |
44 | 44 | |
45 | - parent::__construct( __( 'Custom Content', 'gravityview' ) , 'custom_content', $default_values, $settings ); |
|
45 | + parent::__construct( __( 'Custom Content', 'gravityview' ), 'custom_content', $default_values, $settings ); |
|
46 | 46 | } |
47 | 47 | |
48 | - public function render_frontend( $widget_args, $content = '', $context = '') { |
|
48 | + public function render_frontend( $widget_args, $content = '', $context = '' ) { |
|
49 | 49 | |
50 | - if( !$this->pre_render_frontend() ) { |
|
50 | + if ( ! $this->pre_render_frontend() ) { |
|
51 | 51 | return; |
52 | 52 | } |
53 | 53 | |
54 | - if( !empty( $widget_args['title'] ) ) { |
|
55 | - echo $widget_args['title']; |
|
54 | + if ( ! empty( $widget_args[ 'title' ] ) ) { |
|
55 | + echo $widget_args[ 'title' ]; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
59 | 59 | // Make sure the class is loaded in DataTables |
60 | - if( !class_exists( 'GFFormDisplay' ) ) { |
|
60 | + if ( ! class_exists( 'GFFormDisplay' ) ) { |
|
61 | 61 | include_once( GFCommon::get_base_path() . '/form_display.php' ); |
62 | 62 | } |
63 | 63 | |
64 | - $widget_args['content'] = trim( rtrim( $widget_args['content'] ) ); |
|
64 | + $widget_args[ 'content' ] = trim( rtrim( $widget_args[ 'content' ] ) ); |
|
65 | 65 | |
66 | 66 | // No custom content |
67 | - if( empty( $widget_args['content'] ) ) { |
|
68 | - do_action('gravityview_log_debug', sprintf( '%s[render_frontend]: No content.', get_class($this)) ); |
|
67 | + if ( empty( $widget_args[ 'content' ] ) ) { |
|
68 | + do_action( 'gravityview_log_debug', sprintf( '%s[render_frontend]: No content.', get_class( $this ) ) ); |
|
69 | 69 | return; |
70 | 70 | } |
71 | 71 | |
72 | 72 | // Add paragraphs? |
73 | - if( !empty( $widget_args['wpautop'] ) ) { |
|
74 | - $widget_args['content'] = wpautop( $widget_args['content'] ); |
|
73 | + if ( ! empty( $widget_args[ 'wpautop' ] ) ) { |
|
74 | + $widget_args[ 'content' ] = wpautop( $widget_args[ 'content' ] ); |
|
75 | 75 | } |
76 | 76 | |
77 | - $content = $widget_args['content']; |
|
77 | + $content = $widget_args[ 'content' ]; |
|
78 | 78 | |
79 | 79 | $content = GravityView_Merge_Tags::replace_variables( $content, array(), array(), false, true, false ); |
80 | 80 | |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | |
85 | 85 | |
86 | 86 | // Add custom class |
87 | - $class = !empty( $widget_args['custom_class'] ) ? $widget_args['custom_class'] : ''; |
|
87 | + $class = ! empty( $widget_args[ 'custom_class' ] ) ? $widget_args[ 'custom_class' ] : ''; |
|
88 | 88 | $class = gravityview_sanitize_html_class( $class ); |
89 | 89 | |
90 | - echo '<div class="gv-widget-custom-content '.$class.'">'. $content .'</div>'; |
|
90 | + echo '<div class="gv-widget-custom-content ' . $class . '">' . $content . '</div>'; |
|
91 | 91 | |
92 | 92 | } |
93 | 93 |
@@ -141,7 +141,7 @@ |
||
141 | 141 | global $wpdb; |
142 | 142 | |
143 | 143 | if ( version_compare( GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) |
144 | - && method_exists( 'GFFormsModel', 'get_entry_notes_table_name' ) ) { |
|
144 | + && method_exists( 'GFFormsModel', 'get_entry_notes_table_name' ) ) { |
|
145 | 145 | $notes_table = GFFormsModel::get_entry_notes_table_name(); |
146 | 146 | } else { |
147 | 147 | $notes_table = GFFormsModel::get_lead_notes_table_name(); |