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. Built from https://develop.svn.wordpress.org/trunk@42385 git-svn-id: http://core.svn.wordpress.org/trunk@42214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
078b842c60
commit
46cbfc405f
|
@ -1,12 +1,24 @@
|
||||||
/* global isRtl */
|
/* global isRtl */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Initializes the custom header selection page.
|
||||||
|
*
|
||||||
|
* @since 3.5.0
|
||||||
|
*
|
||||||
|
* @global
|
||||||
|
* @name Global
|
||||||
|
*
|
||||||
|
* @deprecated 4.1.0 The page this is used on is never linked to from the UI.
|
||||||
|
* Setting a custom header is completely handled by the Customizer.
|
||||||
|
*/
|
||||||
(function($) {
|
(function($) {
|
||||||
var frame;
|
var frame;
|
||||||
|
|
||||||
$( function() {
|
$( function() {
|
||||||
// Fetch available headers and apply jQuery.masonry
|
// Fetch available headers.
|
||||||
// once the images have loaded.
|
|
||||||
var $headers = $('.available-headers');
|
var $headers = $('.available-headers');
|
||||||
|
|
||||||
|
// Apply jQuery.masonry once the images have loaded.
|
||||||
$headers.imagesLoaded( function() {
|
$headers.imagesLoaded( function() {
|
||||||
$headers.masonry({
|
$headers.masonry({
|
||||||
itemSelector: '.default-header',
|
itemSelector: '.default-header',
|
||||||
|
@ -14,7 +26,15 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Build the choose from library frame.
|
/**
|
||||||
|
* @summary Opens the 'choose from library' frame and creates it if it doesn't
|
||||||
|
* exist.
|
||||||
|
*
|
||||||
|
* @since 3.5.0
|
||||||
|
* @deprecated 4.1.0
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
$('#choose-from-library-link').click( function( event ) {
|
$('#choose-from-library-link').click( function( event ) {
|
||||||
var $el = $(this);
|
var $el = $(this);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -45,7 +65,14 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// When an image is selected, run a callback.
|
/**
|
||||||
|
* @summary Updates the window location to include the selected attachment.
|
||||||
|
*
|
||||||
|
* @since 3.5.0
|
||||||
|
* @deprecated 4.1.0
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
frame.on( 'select', function() {
|
frame.on( 'select', function() {
|
||||||
// Grab the selected attachment.
|
// Grab the selected attachment.
|
||||||
var attachment = frame.state().get('selection').first(),
|
var attachment = frame.state().get('selection').first(),
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-42384';
|
$wp_version = '5.0-alpha-42385';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue