Make WordPress Core

Changeset 42385


Ignore:
Timestamp:
12/11/2017 04:26:59 PM (7 years ago)
Author:
atimmer
Message:

Docs: Improve JS Docs for custom-header.js.

The custom-header.js file is only used on the wp-admin/themes.php?page=custom-header page. As that page is no longer linked from the UI the functions in the file are marked deprecated.

Props nicollle, jipmoors, diedeexterkate.
Fixes #42678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/custom-header.js

    r26158 r42385  
    11/* global isRtl */
     2
     3/**
     4 * @summary Initializes the custom header selection page.
     5 *
     6 * @since 3.5.0
     7 *
     8 * @global
     9 * @name Global
     10 *
     11 * @deprecated 4.1.0 The page this is used on is never linked to from the UI.
     12 *             Setting a custom header is completely handled by the Customizer.
     13 */
    214(function($) {
    315    var frame;
    416
    517    $( function() {
    6         // Fetch available headers and apply jQuery.masonry
    7         // once the images have loaded.
     18        // Fetch available headers.
    819        var $headers = $('.available-headers');
    920
     21        // Apply jQuery.masonry once the images have loaded.
    1022        $headers.imagesLoaded( function() {
    1123            $headers.masonry({
     
    1527        });
    1628
    17         // Build the choose from library frame.
     29        /**
     30         * @summary Opens the 'choose from library' frame and creates it if it doesn't
     31         *          exist.
     32         *
     33         * @since 3.5.0
     34         * @deprecated 4.1.0
     35         *
     36         * @returns {void}
     37         */
    1838        $('#choose-from-library-link').click( function( event ) {
    1939            var $el = $(this);
     
    4666            });
    4767
    48             // When an image is selected, run a callback.
     68            /**
     69             * @summary Updates the window location to include the selected attachment.
     70             *
     71             * @since 3.5.0
     72             * @deprecated 4.1.0
     73             *
     74             * @returns {void}
     75             */
    4976            frame.on( 'select', function() {
    5077                // Grab the selected attachment.
Note: See TracChangeset for help on using the changeset viewer.