Changeset 42385
- Timestamp:
- 12/11/2017 04:26:59 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/custom-header.js
r26158 r42385 1 1 /* 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 */ 2 14 (function($) { 3 15 var frame; 4 16 5 17 $( function() { 6 // Fetch available headers and apply jQuery.masonry 7 // once the images have loaded. 18 // Fetch available headers. 8 19 var $headers = $('.available-headers'); 9 20 21 // Apply jQuery.masonry once the images have loaded. 10 22 $headers.imagesLoaded( function() { 11 23 $headers.masonry({ … … 15 27 }); 16 28 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 */ 18 38 $('#choose-from-library-link').click( function( event ) { 19 39 var $el = $(this); … … 46 66 }); 47 67 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 */ 49 76 frame.on( 'select', function() { 50 77 // Grab the selected attachment.
Note: See TracChangeset
for help on using the changeset viewer.