@@ -795,6 +795,7 @@ |
||
| 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 | */ |
@@ -20,16 +20,16 @@ |
||
| 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 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | add_action( 'gravityview/view/get', array( $this, 'override_view_page_size' ) ); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - parent::__construct( __( 'Page Size', 'gravityview' ) , 'page_size', $default_values, $settings ); |
|
| 31 | + parent::__construct( __( 'Page Size', 'gravityview' ), 'page_size', $default_values, $settings ); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -64,25 +64,25 @@ discard block |
||
| 64 | 64 | return $sizes; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - public function render_frontend( $widget_args, $content = '', $context = '') { |
|
| 67 | + public function render_frontend( $widget_args, $content = '', $context = '' ) { |
|
| 68 | 68 | |
| 69 | 69 | $search_field = array( |
| 70 | 70 | 'label' => __( 'Page Size', 'gravityview' ), |
| 71 | 71 | 'choices' => self::get_page_sizes( $context ), |
| 72 | - 'value' => (int) \GV\Utils::_GET( 'page_size' ), |
|
| 72 | + 'value' => (int)\GV\Utils::_GET( 'page_size' ), |
|
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | 75 | $default_option = __( 'Change Page Size', 'gravityview' ); |
| 76 | 76 | ?> |
| 77 | 77 | <div class="gv-page-size"> |
| 78 | - <label for="gv-page_size"><?php echo esc_html( $search_field['label'] ); ?></label> |
|
| 78 | + <label for="gv-page_size"><?php echo esc_html( $search_field[ 'label' ] ); ?></label> |
|
| 79 | 79 | <form method="get" action="" onchange="this.submit();"> |
| 80 | 80 | <div> |
| 81 | 81 | <select name="page_size" id="gv-page_size"> |
| 82 | - <option value="" <?php gv_selected( '', $search_field['value'], true ); ?>><?php echo esc_html( $default_option ); ?></option> |
|
| 82 | + <option value="" <?php gv_selected( '', $search_field[ 'value' ], true ); ?>><?php echo esc_html( $default_option ); ?></option> |
|
| 83 | 83 | <?php |
| 84 | - foreach( $search_field['choices'] as $choice ) { ?> |
|
| 85 | - <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> |
|
| 84 | + foreach ( $search_field[ 'choices' ] as $choice ) { ?> |
|
| 85 | + <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> |
|
| 86 | 86 | <?php } ?> |
| 87 | 87 | </select> |
| 88 | 88 | <input type="submit" value="Submit" style="display: none" /> |