Make WordPress Core

Changeset 50831


Ignore:
Timestamp:
05/08/2021 11:20:02 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Correct @since tags for new properties and functions related to infinite scrolling in Media Library.

Follow-up to [50829].

See #50105, #40330, #52628.

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/models/attachments.js

    r50829 r50831  
    351351         * Holds the total number of attachments.
    352352         *
    353          * @since 5.7.0
     353         * @since 5.8.0
    354354         */
    355355        totalAttachments: 0,
     
    358358         * Gets the total number of attachments.
    359359         *
    360          * @since 5.7.0
     360         * @since 5.8.0
    361361         *
    362362         * @return {number} The total number of attachments.
     
    369369         * A custom Ajax-response parser.
    370370         *
    371          * See trac ticket #24753
     371         * See trac ticket #24753.
    372372         *
    373373         * Called automatically by Backbone whenever a collection's models are returned
     
    376376         * the collection items.
    377377         *
    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.
    380380         *
    381381         * @param {Object|Array} response The raw response Object/Array.
     
    385385        parse: function( response, xhr ) {
    386386                if ( ! _.isArray( response.attachments ) ) {
    387                         response = [response.attachments];
     387                        response = [ response.attachments ];
    388388                }
    389389
  • trunk/src/js/media/models/query.js

    r50829 r50831  
    114114
    115115                return this._more = this.fetch( options ).done( function( response ) {
    116                         // Since WordPress 5.5, the response returns the attachments under `response.attachments`.
    117116                        var attachments = response.attachments;
    118117
  • trunk/src/js/media/views/attachments.js

    r50829 r50831  
    3737
    3838                /**
     39                 * @since 5.8.0 Added the `infiniteScrolling` parameter.
     40                 *
    3941                 * @param infiniteScrolling  Whether to enable infinite scrolling or use
    4042                 *                           the default "load more" button.
  • trunk/src/js/media/views/attachments/browser.js

    r50829 r50831  
    457457         * Creates the Attachments wrapper view.
    458458         *
    459          * @since 5.7.0
     459         * @since 5.8.0
    460460         *
    461461         * @return {void}
     
    507507         * Creates the load more button and attachments counter view.
    508508         *
    509          * @since 5.7.0
     509         * @since 5.8.0
    510510         *
    511511         * @return {void}
     
    558558         * We need it to run only once, after all attachments are added or removed.
    559559         *
    560          * @since 5.7.0
     560         * @since 5.8.0
    561561         *
    562562         * @return {void}
     
    611611         * Loads more attachments.
    612612         *
    613          * @since 5.7.0
     613         * @since 5.8.0
    614614         *
    615615         * @return {void}
     
    646646         * Moves focus to the first new added item.     .
    647647         *
    648          * @since 5.7.0
     648         * @since 5.8.0
    649649         *
    650650         * @return {void}
  • trunk/src/wp-admin/includes/ajax-actions.php

    r50829 r50831  
    29282928 *
    29292929 * @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.
    29302932 */
    29312933function wp_ajax_query_attachments() {
  • trunk/src/wp-includes/media.php

    r50829 r50831  
    43104310         * Filters whether the Media Library grid has infinite scrolling. Default `false`.
    43114311         *
    4312          * @since 5.7.0
     4312         * @since 5.8.0
    43134313         *
    43144314         * @param bool $value The filtered value, defaults to `false`.
Note: See TracChangeset for help on using the changeset viewer.