Administration: Fix pagination in categories, tags, and plugins tables.
Fix an issue introduced in [59134] that prevented manual entry of a page number in the pagination input field from navigating pages. Requiring validation of the bulk actions input also impacted other inputs nested in the same form. Also fixes a pre-existing bug where it was not possible to navigate to page 1 using the input field. Props ffffelix, im3dabasia1, apermo, rishavdutta, joedolson, swissspidy, jorbin, joedolson. Fixes #62534. Built from https://develop.svn.wordpress.org/trunk@59727 git-svn-id: http://core.svn.wordpress.org/trunk@59069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -216,6 +216,9 @@ if ( $location ) {
|
|||||||
if ( $pagenum > 1 ) {
|
if ( $pagenum > 1 ) {
|
||||||
$location = add_query_arg( 'paged', $pagenum, $location ); // $pagenum takes care of $total_pages.
|
$location = add_query_arg( 'paged', $pagenum, $location ); // $pagenum takes care of $total_pages.
|
||||||
}
|
}
|
||||||
|
if ( 1 === $pagenum ) {
|
||||||
|
$location = remove_query_arg( 'paged', $location );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the taxonomy redirect destination URL.
|
* Filters the taxonomy redirect destination URL.
|
||||||
|
|||||||
@@ -1310,10 +1310,19 @@ $( function() {
|
|||||||
$document.trigger( 'wp-notice-added' );
|
$document.trigger( 'wp-notice-added' );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Stores initial pagination value for comparison.
|
||||||
|
var initialPagedValue = document.querySelector( '#current-page-selector' ).value;
|
||||||
|
|
||||||
$( '.bulkactions' ).parents( 'form' ).on( 'submit', function( event ) {
|
$( '.bulkactions' ).parents( 'form' ).on( 'submit', function( event ) {
|
||||||
var form = this,
|
var form = this,
|
||||||
submitterName = event.originalEvent && event.originalEvent.submitter ? event.originalEvent.submitter.name : false;
|
submitterName = event.originalEvent && event.originalEvent.submitter ? event.originalEvent.submitter.name : false;
|
||||||
|
|
||||||
|
var currentPagedValue = form.querySelector( '#current-page-selector' ).value;
|
||||||
|
|
||||||
|
if ( initialPagedValue !== currentPagedValue ) {
|
||||||
|
return; // Pagination form submission.
|
||||||
|
}
|
||||||
|
|
||||||
// Observe submissions from posts lists for 'bulk_action' or users lists for 'new_role'.
|
// Observe submissions from posts lists for 'bulk_action' or users lists for 'new_role'.
|
||||||
var bulkFieldRelations = {
|
var bulkFieldRelations = {
|
||||||
'bulk_action' : 'action',
|
'bulk_action' : 'action',
|
||||||
|
|||||||
2
wp-admin/js/common.min.js
vendored
2
wp-admin/js/common.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.8-alpha-59726';
|
$wp_version = '6.8-alpha-59727';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|||||||
Reference in New Issue
Block a user