golden hour
/home/doctorbruno/public_html/siddharastrology.com/wp-includes/js
⬆️ Go Up
Upload
File/Folder
Size
Actions
admin-bar.js
10.4 KB
Del
OK
admin-bar.min.js
3.41 KB
Del
OK
api-request.js
4.98 KB
Del
OK
api-request.min.js
1023 B
Del
OK
autosave.js
22.24 KB
Del
OK
autosave.min.js
5.67 KB
Del
OK
backbone.js
78.55 KB
Del
OK
backbone.min.js
23.74 KB
Del
OK
clipboard.js
26.18 KB
Del
OK
clipboard.min.js
8.8 KB
Del
OK
codemirror
-
Del
OK
colorpicker.js
28.4 KB
Del
OK
colorpicker.min.js
16.11 KB
Del
OK
comment-reply.js
12.34 KB
Del
OK
comment-reply.min.js
2.88 KB
Del
OK
crop
-
Del
OK
customize-base.js
29.25 KB
Del
OK
customize-base.min.js
7.5 KB
Del
OK
customize-loader.js
8.4 KB
Del
OK
customize-loader.min.js
3.47 KB
Del
OK
customize-models.js
8.41 KB
Del
OK
customize-models.min.js
3.59 KB
Del
OK
customize-preview-nav-menus.js
16.3 KB
Del
OK
customize-preview-nav-menus.min.js
4.92 KB
Del
OK
customize-preview-widgets.js
22.74 KB
Del
OK
customize-preview-widgets.min.js
7.64 KB
Del
OK
customize-preview.js
28.7 KB
Del
OK
customize-preview.min.js
10.73 KB
Del
OK
customize-selective-refresh.js
34.22 KB
Del
OK
customize-selective-refresh.min.js
10.44 KB
Del
OK
customize-views.js
6.83 KB
Del
OK
customize-views.min.js
2.52 KB
Del
OK
dist
-
Del
OK
heartbeat.js
23.87 KB
Del
OK
heartbeat.min.js
5.81 KB
Del
OK
hoverIntent.js
7.06 KB
Del
OK
hoverIntent.min.js
1.46 KB
Del
OK
hoverintent-js.min.js
1.68 KB
Del
OK
imagesloaded.min.js
5.39 KB
Del
OK
imgareaselect
-
Del
OK
jcrop
-
Del
OK
jquery
-
Del
OK
json2.js
31 B
Del
OK
json2.min.js
35 B
Del
OK
masonry.min.js
23.57 KB
Del
OK
mce-view.js
26.19 KB
Del
OK
mce-view.min.js
9.54 KB
Del
OK
media-audiovideo.js
25.18 KB
Del
OK
media-audiovideo.min.js
11.77 KB
Del
OK
media-editor.js
29.75 KB
Del
OK
media-editor.min.js
10.83 KB
Del
OK
media-grid.js
27.93 KB
Del
OK
media-grid.min.js
13.37 KB
Del
OK
media-models.js
48.24 KB
Del
OK
media-models.min.js
13.03 KB
Del
OK
media-views.js
281.76 KB
Del
OK
media-views.min.js
108.27 KB
Del
OK
mediaelement
-
Del
OK
plupload
-
Del
OK
quicktags.js
23.16 KB
Del
OK
quicktags.min.js
10.87 KB
Del
OK
shortcode.js
10.51 KB
Del
OK
shortcode.min.js
2.58 KB
Del
OK
swfobject.js
0 B
Del
OK
swfobject.min.js
35 B
Del
OK
swfupload
-
Del
OK
thickbox
-
Del
OK
tinymce
-
Del
OK
tw-sack.js
4.85 KB
Del
OK
tw-sack.min.js
3.21 KB
Del
OK
twemoji.js
36.31 KB
Del
OK
twemoji.min.js
19.38 KB
Del
OK
underscore.js
67.26 KB
Del
OK
underscore.min.js
18.57 KB
Del
OK
utils.js
6.17 KB
Del
OK
utils.min.js
1.82 KB
Del
OK
wp-ajax-response.js
3.81 KB
Del
OK
wp-ajax-response.min.js
2.51 KB
Del
OK
wp-api.js
49.73 KB
Del
OK
wp-api.min.js
14.34 KB
Del
OK
wp-auth-check.js
4.4 KB
Del
OK
wp-auth-check.min.js
1.65 KB
Del
OK
wp-backbone.js
14.89 KB
Del
OK
wp-backbone.min.js
2.97 KB
Del
OK
wp-custom-header.js
10.7 KB
Del
OK
wp-custom-header.min.js
4.34 KB
Del
OK
wp-embed-template.js
7.91 KB
Del
OK
wp-embed-template.min.js
3.07 KB
Del
OK
wp-embed.js
3.34 KB
Del
OK
wp-embed.min.js
1.22 KB
Del
OK
wp-emoji-loader.js
13.61 KB
Del
OK
wp-emoji-loader.min.js
2.91 KB
Del
OK
wp-emoji-release.min.js
22.22 KB
Del
OK
wp-emoji.js
8.68 KB
Del
OK
wp-emoji.min.js
2.79 KB
Del
OK
wp-list-revisions.js
1.08 KB
Del
OK
wp-list-revisions.min.js
597 B
Del
OK
wp-lists.js
24.7 KB
Del
OK
wp-lists.min.js
7.34 KB
Del
OK
wp-pointer.js
10.03 KB
Del
OK
wp-pointer.min.js
3.54 KB
Del
OK
wp-sanitize.js
1.62 KB
Del
OK
wp-sanitize.min.js
402 B
Del
OK
wp-tooltip.js
1.8 KB
Del
OK
wp-tooltip.min.js
643 B
Del
OK
wp-util.js
4.58 KB
Del
OK
wp-util.min.js
1.4 KB
Del
OK
wpdialog.js
569 B
Del
OK
wpdialog.min.js
281 B
Del
OK
wplink.js
21.1 KB
Del
OK
wplink.min.js
11.05 KB
Del
OK
zxcvbn-async.js
821 B
Del
OK
zxcvbn-async.min.js
351 B
Del
OK
zxcvbn.min.js
802.97 KB
Del
OK
Edit: customize-models.js
/** * @output wp-includes/js/customize-models.js */ /* global _wpCustomizeHeader */ /** * The WordPress Customizer models API. * * @param {JQueryStatic} $ The jQuery object. * @param {Object} wp The WordPress global object. */ (function( $, wp ) { var api = wp.customize; /** @namespace wp.customize.HeaderTool */ api.HeaderTool = {}; /** * wp.customize.HeaderTool.ImageModel * * A header image. This is where saves via the Customizer API are * abstracted away, plus our own Ajax calls to add images to and remove * images from the user's recently uploaded images setting on the server. * These calls are made regardless of whether the user actually saves new * Customizer settings. * * @memberOf wp.customize.HeaderTool * @alias wp.customize.HeaderTool.ImageModel * * @class * @augments Backbone.Model */ api.HeaderTool.ImageModel = Backbone.Model.extend(/** @lends wp.customize.HeaderTool.ImageModel.prototype */{ /** * Returns the default attributes for a header image. * * @return {Object} Default attributes. */ defaults: function() { return { header: { attachment_id: 0, url: '', timestamp: _.now(), thumbnail_url: '' }, choice: '', selected: false, random: false }; }, /** * Initializes the model, hiding the header when asked to. */ initialize: function() { this.on('hide', this.hide, this); }, /** * Hides the header image, removing it from the site. */ hide: function() { this.set('choice', ''); api('header_image').set('remove-header'); api('header_image_data').set('remove-header'); }, /** * Removes the image, hiding the header first if it is the current one. */ destroy: function() { var data = this.get('header'), curr = api.HeaderTool.currentHeader.get('header').attachment_id; // If the image we're removing is also the current header, // unset the latter. if (curr && data.attachment_id === curr) { api.HeaderTool.currentHeader.trigger('hide'); } wp.ajax.post( 'custom-header-remove', { nonce: _wpCustomizeHeader.nonces.remove, wp_customize: 'on', theme: api.settings.theme.stylesheet, attachment_id: data.attachment_id }); this.trigger('destroy', this, this.collection); }, /** * Makes this image the current header image. */ save: function() { if (this.get('random')) { api('header_image').set(this.get('header').random); api('header_image_data').set(this.get('header').random); } else { if (this.get('header').defaultName) { api('header_image').set(this.get('header').url); api('header_image_data').set(this.get('header').defaultName); } else { api('header_image').set(this.get('header').url); api('header_image_data').set(this.get('header')); } } api.HeaderTool.combinedList.trigger('control:setImage', this); }, /** * Adds the image to the theme's uploaded headers. */ importImage: function() { var data = this.get('header'); if (data.attachment_id === undefined) { return; } wp.ajax.post( 'custom-header-add', { nonce: _wpCustomizeHeader.nonces.add, wp_customize: 'on', theme: api.settings.theme.stylesheet, attachment_id: data.attachment_id } ); }, /** * Returns whether the image needs cropping for this theme. * * @return {boolean} Whether the image should be cropped. */ shouldBeCropped: function() { if (this.get('themeFlexWidth') === true && this.get('themeFlexHeight') === true) { return false; } if (this.get('themeFlexWidth') === true && this.get('themeHeight') === this.get('imageHeight')) { return false; } if (this.get('themeFlexHeight') === true && this.get('themeWidth') === this.get('imageWidth')) { return false; } if (this.get('themeWidth') === this.get('imageWidth') && this.get('themeHeight') === this.get('imageHeight')) { return false; } if (this.get('imageWidth') <= this.get('themeWidth')) { return false; } return true; } }); /** * wp.customize.HeaderTool.ChoiceList * * @memberOf wp.customize.HeaderTool * @alias wp.customize.HeaderTool.ChoiceList * * @class * @augments Backbone.Collection */ api.HeaderTool.ChoiceList = Backbone.Collection.extend({ model: api.HeaderTool.ImageModel, /** * Orders the collection from most recently used to least. * * @param {Backbone.Model} model The model to sort. * @return {number} The sort order. */ comparator: function(model) { return -model.get('header').timestamp; }, /** * Initializes the collection from the uploaded header images. */ initialize: function() { var current = api.HeaderTool.currentHeader.get('choice').replace(/^https?:\/\//, ''), isRandom = this.isRandomChoice(api.get().header_image); // Overridable by an extending class. if (!this.type) { this.type = 'uploaded'; } // Overridable by an extending class. if (typeof this.data === 'undefined') { this.data = _wpCustomizeHeader.uploads; } if (isRandom) { // So that when adding data we don't hide regular images. current = api.get().header_image; } this.on('control:setImage', this.setImage, this); this.on('control:removeImage', this.removeImage, this); this.on('add', this.maybeRemoveOldCrop, this); this.on('add', this.maybeAddRandomChoice, this); _.each(this.data, function(elt, index) { if (!elt.attachment_id) { elt.defaultName = index; } if (typeof elt.timestamp === 'undefined') { elt.timestamp = 0; } this.add({ header: elt, choice: elt.url.split('/').pop(), selected: current === elt.url.replace(/^https?:\/\//, '') }, { silent: true }); }, this); if (this.size() > 0) { this.addRandomChoice(current); } }, /** * Removes an image's previous crop once it has been replaced. * * @param {Backbone.Model} model Model. */ maybeRemoveOldCrop: function( model ) { var newID = model.get( 'header' ).attachment_id || false, oldCrop; // Bail early if we don't have a new attachment ID. if ( ! newID ) { return; } oldCrop = this.find( function( item ) { return ( item.cid !== model.cid && item.get( 'header' ).attachment_id === newID ); } ); // If we found an old crop, remove it from the collection. if ( oldCrop ) { this.remove( oldCrop ); } }, /** * Adds the random choice once a single image is left. */ maybeAddRandomChoice: function() { if (this.size() === 1) { this.addRandomChoice(); } }, /** * Adds the random image choice to the collection. * * @param {string} initialChoice Initial choice. */ addRandomChoice: function(initialChoice) { var isRandomSameType = RegExp(this.type).test(initialChoice), randomChoice = 'random-' + this.type + '-image'; this.add({ header: { timestamp: 0, random: randomChoice, width: 245, height: 41 }, choice: randomChoice, random: true, selected: isRandomSameType }); }, /** * Returns whether a choice is one of the random image choices. * * @param {string} choice Choice. * @return {boolean} Whether the choice is random. */ isRandomChoice: function(choice) { return (/^random-(uploaded|default)-image$/).test(choice); }, /** * Returns whether the list title should be hidden. * * @return {boolean} Whether the title should be hidden. */ shouldHideTitle: function() { return this.size() < 2; }, /** * Marks a single image as the selected one. * * @param {Backbone.Model} model Model. */ setImage: function(model) { this.each(function(m) { m.set('selected', false); }); if (model) { model.set('selected', true); } }, /** * Clears the selection. */ removeImage: function() { this.each(function(m) { m.set('selected', false); }); } }); /** * wp.customize.HeaderTool.DefaultsList * * @memberOf wp.customize.HeaderTool * @alias wp.customize.HeaderTool.DefaultsList * * @class * @augments wp.customize.HeaderTool.ChoiceList * @augments Backbone.Collection */ api.HeaderTool.DefaultsList = api.HeaderTool.ChoiceList.extend({ /** * Initializes the collection from the theme's default header images. */ initialize: function() { this.type = 'default'; this.data = _wpCustomizeHeader.defaults; api.HeaderTool.ChoiceList.prototype.initialize.apply(this); } }); })( jQuery, window.wp );
Save