Completed
Push — develop ( 88d520...3e7a99 )
by Zack
34:23 queued 14:23
created
includes/widgets/class-gravityview-widget-custom-content.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 	function __construct() {
21 21
 
22
-		$this->widget_description = __('Insert custom text or HTML as a widget', 'gravityview' );
22
+		$this->widget_description = __( 'Insert custom text or HTML as a widget', 'gravityview' );
23 23
 
24 24
 		$default_values = array(
25 25
 			'header' => 1,
@@ -44,39 +44,39 @@  discard block
 block discarded – undo
44 44
 			),
45 45
 		);
46 46
 
47
-		parent::__construct( __( 'Custom Content', 'gravityview' ) , 'custom_content', $default_values, $settings );
47
+		parent::__construct( __( 'Custom Content', 'gravityview' ), 'custom_content', $default_values, $settings );
48 48
 	}
49 49
 
50
-	public function render_frontend( $widget_args, $content = '', $context = '') {
50
+	public function render_frontend( $widget_args, $content = '', $context = '' ) {
51 51
 
52
-		if( !$this->pre_render_frontend() ) {
52
+		if ( ! $this->pre_render_frontend() ) {
53 53
 			return;
54 54
 		}
55 55
 
56
-		if( !empty( $widget_args['title'] ) ) {
57
-			echo $widget_args['title'];
56
+		if ( ! empty( $widget_args[ 'title' ] ) ) {
57
+			echo $widget_args[ 'title' ];
58 58
 		}
59 59
 
60 60
 
61 61
 		// Make sure the class is loaded in DataTables
62
-		if( !class_exists( 'GFFormDisplay' ) ) {
62
+		if ( ! class_exists( 'GFFormDisplay' ) ) {
63 63
 			include_once( GFCommon::get_base_path() . '/form_display.php' );
64 64
 		}
65 65
 
66
-		$widget_args['content'] = trim( rtrim( \GV\Utils::get( $widget_args, 'content' ) ) );
66
+		$widget_args[ 'content' ] = trim( rtrim( \GV\Utils::get( $widget_args, 'content' ) ) );
67 67
 
68 68
 		// No custom content
69
-		if( empty( $widget_args['content'] ) ) {
69
+		if ( empty( $widget_args[ 'content' ] ) ) {
70 70
 			gravityview()->log->debug( 'No content.' );
71 71
 			return;
72 72
 		}
73 73
 
74 74
 		// Add paragraphs?
75
-		if( !empty( $widget_args['wpautop'] ) ) {
76
-			$widget_args['content'] = wpautop( $widget_args['content'] );
75
+		if ( ! empty( $widget_args[ 'wpautop' ] ) ) {
76
+			$widget_args[ 'content' ] = wpautop( $widget_args[ 'content' ] );
77 77
 		}
78 78
 
79
-		$content = $widget_args['content'];
79
+		$content = $widget_args[ 'content' ];
80 80
 
81 81
 		$content = GravityView_Merge_Tags::replace_variables( $content, array(), array(), false, true, false );
82 82
 
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
 
87 87
 
88 88
 		// Add custom class
89
-		$class = !empty( $widget_args['custom_class'] ) ? $widget_args['custom_class'] : '';
89
+		$class = ! empty( $widget_args[ 'custom_class' ] ) ? $widget_args[ 'custom_class' ] : '';
90 90
 		$class = gravityview_sanitize_html_class( $class );
91 91
 
92
-		echo '<div class="gv-widget-custom-content '.$class.'">'. $content .'</div>';
92
+		echo '<div class="gv-widget-custom-content ' . $class . '">' . $content . '</div>';
93 93
 
94 94
 	}
95 95
 
Please login to merge, or discard this patch.