Completed
Pull Request — develop (#1156)
by Zack
21:54 queued 16:19
created
future/includes/class-gv-view.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -795,6 +795,7 @@
 block discarded – undo
795 795
 	 * Retrieve the entries for the current view and request.
796 796
 	 *
797 797
 	 * @param \GV\Request The request. Unused for now.
798
+	 * @param Request $request
798 799
 	 *
799 800
 	 * @return \GV\Entry_Collection The entries.
800 801
 	 */
Please login to merge, or discard this patch.
includes/widgets/register-gravityview-widgets.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@
 block discarded – undo
20 20
  */
21 21
 function gravityview_register_gravityview_widgets() {
22 22
 
23
-	include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget.php' );
23
+	include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget.php' );
24 24
 
25
-	include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-pagination-info.php' );
26
-	include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-page-links.php' );
27
-	include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-page-size.php' );
28
-	include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-custom-content.php' );
29
-	include_once( GRAVITYVIEW_DIR .'includes/widgets/search-widget/class-search-widget.php' );
25
+	include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-pagination-info.php' );
26
+	include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-page-links.php' );
27
+	include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-page-size.php' );
28
+	include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-custom-content.php' );
29
+	include_once( GRAVITYVIEW_DIR . 'includes/widgets/search-widget/class-search-widget.php' );
30 30
 
31
-	if( class_exists('GFPolls') ) {
32
-		include_once( GRAVITYVIEW_DIR .'includes/widgets/poll/class-gravityview-widget-poll.php' );
31
+	if ( class_exists( 'GFPolls' ) ) {
32
+		include_once( GRAVITYVIEW_DIR . 'includes/widgets/poll/class-gravityview-widget-poll.php' );
33 33
 	}
34 34
 
35 35
 }
Please login to merge, or discard this patch.
includes/widgets/class-gravityview-widget-page-size.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 
75 75
 	/**
76 76
 	 * Render the page size widget
77
-     *
77
+	 *
78 78
 	 * @param array $widget_args The Widget shortcode args.
79 79
 	 * @param string $content The content.
80 80
 	 * @param string|\GV\Template_Context $context The context, if available.
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		$default_size = 25;
46 46
 
47 47
 		if ( $context instanceof \GV\Template_Context ) {
48
-			$default_size = (int) $context->view->settings->get( 'page_size' );
48
+			$default_size = (int)$context->view->settings->get( 'page_size' );
49 49
 		}
50 50
 
51 51
 		$sizes = array( 10, 25, $default_size, 50, 100 );
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 		$page_sizes = array();
58 58
 		foreach ( $sizes as $size ) {
59
-			$page_sizes [] = array(
59
+			$page_sizes [ ] = array(
60 60
 				'value' => $size,
61 61
 				'text'  => $size
62 62
 			);
@@ -84,21 +84,21 @@  discard block
 block discarded – undo
84 84
 		$search_field = array(
85 85
 			'label'   => __( 'Page Size', 'gravityview' ),
86 86
 			'choices' => self::get_page_sizes( $context ),
87
-			'value'   => (int) \GV\Utils::_GET( 'page_size', $context->view->settings->get( 'page_size' ) ),
87
+			'value'   => (int)\GV\Utils::_GET( 'page_size', $context->view->settings->get( 'page_size' ) ),
88 88
 		);
89 89
 
90 90
 		$default_option = __( 'Results Per Page', 'gravityview' );
91 91
 
92 92
 		?>
93 93
         <div class="gv-page-size">
94
-            <label for="gv-page_size"><?php echo esc_html( $search_field['label'] ); ?></label>
94
+            <label for="gv-page_size"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
95 95
             <form method="get" action="" onchange="this.submit();">
96 96
                 <div>
97 97
                     <select name="page_size" id="gv-page_size">
98
-                        <option value="" <?php gv_selected( '', $search_field['value'], true ); ?>><?php echo esc_html( $default_option ); ?></option>
98
+                        <option value="" <?php gv_selected( '', $search_field[ 'value' ], true ); ?>><?php echo esc_html( $default_option ); ?></option>
99 99
 						<?php
100
-						foreach ( $search_field['choices'] as $choice ) { ?>
101
-                            <option value='<?php echo esc_attr( $choice['value'] ); ?>'<?php gv_selected( esc_attr( $choice['value'] ), esc_attr( $search_field['value'] ), true ); ?>><?php echo esc_html( $choice['text'] ); ?></option>
100
+						foreach ( $search_field[ 'choices' ] as $choice ) { ?>
101
+                            <option value='<?php echo esc_attr( $choice[ 'value' ] ); ?>'<?php gv_selected( esc_attr( $choice[ 'value' ] ), esc_attr( $search_field[ 'value' ] ), true ); ?>><?php echo esc_html( $choice[ 'text' ] ); ?></option>
102 102
 						<?php } ?>
103 103
                     </select>
104 104
                     <input type="submit" value="Submit" style="display: none"/>
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 		}
130 130
 
131 131
 		// Already overridden
132
-		if ( (int) $page_size === (int) $view->settings->get( 'page_size' ) ) {
132
+		if ( (int)$page_size === (int)$view->settings->get( 'page_size' ) ) {
133 133
 			return;
134 134
 		}
135 135
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 			'view' => $view,
138 138
 		) );
139 139
 
140
-		if ( ! in_array( (int) $page_size, wp_list_pluck( self::get_page_sizes( $context ), 'value' ), true ) ) {
140
+		if ( ! in_array( (int)$page_size, wp_list_pluck( self::get_page_sizes( $context ), 'value' ), true ) ) {
141 141
 			gravityview()->log->warning( 'The passed page size is not allowed: {page_size}. Not modifying result.', array( 'page_size' => $page_size ) );
142 142
 			return;
143 143
 		}
Please login to merge, or discard this patch.