Media: Featured image modal loads only selected image when infinite scroll is disabled.
Follow-up to [52167], which partially fixed a bug introduced in [50829] that caused media modal to only load the selected image. This commit adds additional checks to ensure infinite scroll is disabled. Follow-up to [50829], [52167]. Props dariak, joedolson, szaqal21. Fixes #53765. Built from https://develop.svn.wordpress.org/trunk@52287 git-svn-id: http://core.svn.wordpress.org/trunk@51879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
13c5637263
commit
be55859f78
|
@ -4075,7 +4075,7 @@ FeaturedImage = Library.extend(/** @lends wp.media.controller.FeaturedImage.prot
|
|||
|
||||
selection.reset( attachment ? [ attachment ] : [] );
|
||||
|
||||
if ( library.hasMore() ) {
|
||||
if ( ! infinite_scrolling && library.hasMore() ) {
|
||||
library.more();
|
||||
}
|
||||
}
|
||||
|
@ -7478,7 +7478,7 @@ ReplaceImage = Library.extend(/** @lends wp.media.controller.ReplaceImage.protot
|
|||
|
||||
selection.reset( attachment ? [ attachment ] : [] );
|
||||
|
||||
if ( library.hasMore() ) {
|
||||
if ( ! infinite_scrolling && library.getTotalAttachments() == 0 && library.hasMore() ) {
|
||||
library.more();
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-52286';
|
||||
$wp_version = '5.9-alpha-52287';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue