Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
|
@ -1,4 +1,13 @@
|
|||
/**
|
||||
* @output wp-admin/js/widgets/media-widgets.js
|
||||
*/
|
||||
|
||||
/* eslint consistent-this: [ "error", "control" ] */
|
||||
|
||||
/**
|
||||
* @namespace wp.mediaWidgets
|
||||
* @memberOf wp
|
||||
*/
|
||||
wp.mediaWidgets = ( function( $ ) {
|
||||
'use strict';
|
||||
|
||||
|
|
@ -9,6 +18,8 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
*
|
||||
* Media widgets register themselves by assigning subclasses of MediaWidgetControl onto this object by widget ID base.
|
||||
*
|
||||
* @memberOf wp.mediaWidgets
|
||||
*
|
||||
* @type {Object.<string, wp.mediaWidgets.MediaWidgetModel>}
|
||||
*/
|
||||
component.controlConstructors = {};
|
||||
|
|
@ -18,22 +29,22 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
*
|
||||
* Media widgets register themselves by assigning subclasses of MediaWidgetControl onto this object by widget ID base.
|
||||
*
|
||||
* @memberOf wp.mediaWidgets
|
||||
*
|
||||
* @type {Object.<string, wp.mediaWidgets.MediaWidgetModel>}
|
||||
*/
|
||||
component.modelConstructors = {};
|
||||
|
||||
/**
|
||||
* Library which persists the customized display settings across selections.
|
||||
*
|
||||
* @class PersistentDisplaySettingsLibrary
|
||||
* @constructor
|
||||
*/
|
||||
component.PersistentDisplaySettingsLibrary = wp.media.controller.Library.extend({
|
||||
component.PersistentDisplaySettingsLibrary = wp.media.controller.Library.extend(/** @lends wp.mediaWidgets.PersistentDisplaySettingsLibrary.prototype */{
|
||||
|
||||
/**
|
||||
* Initialize.
|
||||
* Library which persists the customized display settings across selections.
|
||||
*
|
||||
* @constructs wp.mediaWidgets.PersistentDisplaySettingsLibrary
|
||||
* @augments wp.media.controller.Library
|
||||
*
|
||||
* @param {Object} options - Options.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
initialize: function initialize( options ) {
|
||||
|
|
@ -79,10 +90,10 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
/**
|
||||
* Extended view for managing the embed UI.
|
||||
*
|
||||
* @class MediaEmbedView
|
||||
* @constructor
|
||||
* @class wp.mediaWidgets.MediaEmbedView
|
||||
* @augments wp.media.view.Embed
|
||||
*/
|
||||
component.MediaEmbedView = wp.media.view.Embed.extend({
|
||||
component.MediaEmbedView = wp.media.view.Embed.extend(/** @lends wp.mediaWidgets.MediaEmbedView.prototype */{
|
||||
|
||||
/**
|
||||
* Initialize.
|
||||
|
|
@ -109,6 +120,9 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
* @returns {void}
|
||||
*/
|
||||
refresh: function refresh() {
|
||||
/**
|
||||
* @class wp.mediaWidgets~Constructor
|
||||
*/
|
||||
var Constructor;
|
||||
|
||||
if ( 'image' === this.controller.options.mimeType ) {
|
||||
|
|
@ -116,7 +130,7 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
} else {
|
||||
|
||||
// This should be eliminated once #40450 lands of when this is merged into core.
|
||||
Constructor = wp.media.view.EmbedLink.extend({
|
||||
Constructor = wp.media.view.EmbedLink.extend(/** @lends wp.mediaWidgets~Constructor.prototype */{
|
||||
|
||||
/**
|
||||
* Set the disabled state on the Add to Widget button.
|
||||
|
|
@ -284,10 +298,10 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
/**
|
||||
* Custom media frame for selecting uploaded media or providing media by URL.
|
||||
*
|
||||
* @class MediaFrameSelect
|
||||
* @constructor
|
||||
* @class wp.mediaWidgets.MediaFrameSelect
|
||||
* @augments wp.media.view.MediaFrame.Post
|
||||
*/
|
||||
component.MediaFrameSelect = wp.media.view.MediaFrame.Post.extend({
|
||||
component.MediaFrameSelect = wp.media.view.MediaFrame.Post.extend(/** @lends wp.mediaWidgets.MediaFrameSelect.prototype */{
|
||||
|
||||
/**
|
||||
* Create the default states.
|
||||
|
|
@ -357,6 +371,8 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
/**
|
||||
* Handle click.
|
||||
*
|
||||
* @ignore
|
||||
*
|
||||
* @fires wp.media.controller.State#insert()
|
||||
* @returns {void}
|
||||
*/
|
||||
|
|
@ -408,14 +424,7 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Media widget control.
|
||||
*
|
||||
* @class MediaWidgetControl
|
||||
* @constructor
|
||||
* @abstract
|
||||
*/
|
||||
component.MediaWidgetControl = Backbone.View.extend({
|
||||
component.MediaWidgetControl = Backbone.View.extend(/** @lends wp.mediaWidgets.MediaWidgetControl.prototype */{
|
||||
|
||||
/**
|
||||
* Translation strings.
|
||||
|
|
@ -473,12 +482,17 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
showDisplaySettings: true,
|
||||
|
||||
/**
|
||||
* Initialize.
|
||||
* Media Widget Control.
|
||||
*
|
||||
* @constructs wp.mediaWidgets.MediaWidgetControl
|
||||
* @augments Backbone.View
|
||||
* @abstract
|
||||
*
|
||||
* @param {Object} options - Options.
|
||||
* @param {Backbone.Model} options.model - Model.
|
||||
* @param {jQuery} options.el - Control field container element.
|
||||
* @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
initialize: function initialize( options ) {
|
||||
|
|
@ -961,10 +975,10 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
/**
|
||||
* Media widget model.
|
||||
*
|
||||
* @class MediaWidgetModel
|
||||
* @constructor
|
||||
* @class wp.mediaWidgets.MediaWidgetModel
|
||||
* @augments Backbone.Model
|
||||
*/
|
||||
component.MediaWidgetModel = Backbone.Model.extend({
|
||||
component.MediaWidgetModel = Backbone.Model.extend(/** @lends wp.mediaWidgets.MediaWidgetModel.prototype */{
|
||||
|
||||
/**
|
||||
* Id attribute.
|
||||
|
|
@ -1085,15 +1099,19 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
/**
|
||||
* Collection of all widget model instances.
|
||||
*
|
||||
* @memberOf wp.mediaWidgets
|
||||
*
|
||||
* @type {Backbone.Collection}
|
||||
*/
|
||||
component.modelCollection = new ( Backbone.Collection.extend({
|
||||
component.modelCollection = new ( Backbone.Collection.extend( {
|
||||
model: component.MediaWidgetModel
|
||||
}) )();
|
||||
|
||||
/**
|
||||
* Mapping of widget ID to instances of MediaWidgetControl subclasses.
|
||||
*
|
||||
* @memberOf wp.mediaWidgets
|
||||
*
|
||||
* @type {Object.<string, wp.mediaWidgets.MediaWidgetControl>}
|
||||
*/
|
||||
component.widgetControls = {};
|
||||
|
|
@ -1101,8 +1119,11 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
/**
|
||||
* Handle widget being added or initialized for the first time at the widget-added event.
|
||||
*
|
||||
* @memberOf wp.mediaWidgets
|
||||
*
|
||||
* @param {jQuery.Event} event - Event.
|
||||
* @param {jQuery} widgetContainer - Widget container element.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
component.handleWidgetAdded = function handleWidgetAdded( event, widgetContainer ) {
|
||||
|
|
@ -1184,6 +1205,8 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
/**
|
||||
* Setup widget in accessibility mode.
|
||||
*
|
||||
* @memberOf wp.mediaWidgets
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
component.setupAccessibleMode = function setupAccessibleMode() {
|
||||
|
|
@ -1233,8 +1256,11 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
* the widgets admin screen and also via the 'widget-synced' event when making
|
||||
* a change to a widget in the customizer.
|
||||
*
|
||||
* @memberOf wp.mediaWidgets
|
||||
*
|
||||
* @param {jQuery.Event} event - Event.
|
||||
* @param {jQuery} widgetContainer - Widget container element.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
component.handleWidgetUpdated = function handleWidgetUpdated( event, widgetContainer ) {
|
||||
|
|
@ -1267,6 +1293,8 @@ wp.mediaWidgets = ( function( $ ) {
|
|||
* When WordPress enqueues this script, it should have an inline script
|
||||
* attached which calls wp.mediaWidgets.init().
|
||||
*
|
||||
* @memberOf wp.mediaWidgets
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
component.init = function init() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue