Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#25675 closed defect (bug) (fixed)

Fix pagination in install-plugins.php to work with the filter install_plugins_table_api_args_$tab

Reported by: brasofilo Owned by: SergeyBiryukov
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.8
Component: Plugins Keywords: has-patch
Focuses: administration Cc:


We can modify the per_page value in different tabs of the Install Plugins screen using the hook install_plugins_table_api_args_$tab, but pagination does not reflect that.

Per page is add as an argument value in line 63

$args = array( 'page' => $paged, 'per_page' => $per_page );

The filter is applied on the arguments in line 118, but right after, in 132, the pagination args refer back to $per_page instead of $args['per_page'], which would produce the desired effect.

Attachments (1)

25675.patch (470 bytes) - added by brasofilo 7 years ago.
Per page in wp-admin/includes/class-wp-plugin-install-list-table.php

Download all attachments as: .zip

Change History (5)

7 years ago

Per page in wp-admin/includes/class-wp-plugin-install-list-table.php

#1 @ericlewis
6 years ago

  • Focuses administration added

Yep. Patch looks good.

Removing the definition of $per_page = 30; as well would clean up the code here, though that might be unnecessary refactoring.

#2 @mordauk
6 years ago

Patch looks good to me.

#3 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 3.9

#4 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 27221:

Use filtered per_page value in WP_Plugin_Install_List_Table and WP_Theme_Install_List_Table.

props brasofilo.
fixes #25675.

Note: See TracTickets for help on using tickets.