Changeset 50831
- Timestamp:
- 05/08/2021 11:20:02 AM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/media/models/attachments.js
r50829 r50831 351 351 * Holds the total number of attachments. 352 352 * 353 * @since 5. 7.0353 * @since 5.8.0 354 354 */ 355 355 totalAttachments: 0, … … 358 358 * Gets the total number of attachments. 359 359 * 360 * @since 5. 7.0360 * @since 5.8.0 361 361 * 362 362 * @return {number} The total number of attachments. … … 369 369 * A custom Ajax-response parser. 370 370 * 371 * See trac ticket #24753 371 * See trac ticket #24753. 372 372 * 373 373 * Called automatically by Backbone whenever a collection's models are returned … … 376 376 * the collection items. 377 377 * 378 * Since WordPress 5.5, the response returns the attachments under `response.attachments`379 * and`response.totalAttachments` holds the total number of attachments found.378 * @since 5.8.0 The response returns the attachments under `response.attachments` and 379 * `response.totalAttachments` holds the total number of attachments found. 380 380 * 381 381 * @param {Object|Array} response The raw response Object/Array. … … 385 385 parse: function( response, xhr ) { 386 386 if ( ! _.isArray( response.attachments ) ) { 387 response = [ response.attachments];387 response = [ response.attachments ]; 388 388 } 389 389 -
trunk/src/js/media/models/query.js
r50829 r50831 114 114 115 115 return this._more = this.fetch( options ).done( function( response ) { 116 // Since WordPress 5.5, the response returns the attachments under `response.attachments`.117 116 var attachments = response.attachments; 118 117 -
trunk/src/js/media/views/attachments.js
r50829 r50831 37 37 38 38 /** 39 * @since 5.8.0 Added the `infiniteScrolling` parameter. 40 * 39 41 * @param infiniteScrolling Whether to enable infinite scrolling or use 40 42 * the default "load more" button. -
trunk/src/js/media/views/attachments/browser.js
r50829 r50831 457 457 * Creates the Attachments wrapper view. 458 458 * 459 * @since 5. 7.0459 * @since 5.8.0 460 460 * 461 461 * @return {void} … … 507 507 * Creates the load more button and attachments counter view. 508 508 * 509 * @since 5. 7.0509 * @since 5.8.0 510 510 * 511 511 * @return {void} … … 558 558 * We need it to run only once, after all attachments are added or removed. 559 559 * 560 * @since 5. 7.0560 * @since 5.8.0 561 561 * 562 562 * @return {void} … … 611 611 * Loads more attachments. 612 612 * 613 * @since 5. 7.0613 * @since 5.8.0 614 614 * 615 615 * @return {void} … … 646 646 * Moves focus to the first new added item. . 647 647 * 648 * @since 5. 7.0648 * @since 5.8.0 649 649 * 650 650 * @return {void} -
trunk/src/wp-admin/includes/ajax-actions.php
r50829 r50831 2928 2928 * 2929 2929 * @since 3.5.0 2930 * @since 5.8.0 The response returns the attachments under `response.attachments` and 2931 * `response.totalAttachments` holds the total number of attachments found. 2930 2932 */ 2931 2933 function wp_ajax_query_attachments() { -
trunk/src/wp-includes/media.php
r50829 r50831 4310 4310 * Filters whether the Media Library grid has infinite scrolling. Default `false`. 4311 4311 * 4312 * @since 5. 7.04312 * @since 5.8.0 4313 4313 * 4314 4314 * @param bool $value The filtered value, defaults to `false`.
Note: See TracChangeset
for help on using the changeset viewer.