golden hour
/var/www/nanshen/wp-includes/js
⬆️ Go Up
Upload
File/Folder
Size
Actions
admin-bar.js
10.88 KB
Del
OK
admin-bar.min.js
6.61 KB
Del
OK
autosave.js
15.78 KB
Del
OK
autosave.min.js
5.23 KB
Del
OK
backbone.min.js
18.59 KB
Del
OK
colorpicker.js
28.4 KB
Del
OK
colorpicker.min.js
16.14 KB
Del
OK
comment-reply.js
1.2 KB
Del
OK
comment-reply.min.js
755 B
Del
OK
crop
-
Del
OK
customize-base.js
15.25 KB
Del
OK
customize-base.min.js
6.45 KB
Del
OK
customize-loader.js
4.18 KB
Del
OK
customize-loader.min.js
2.48 KB
Del
OK
customize-models.js
5.74 KB
Del
OK
customize-models.min.js
3.36 KB
Del
OK
customize-preview-widgets.js
3.64 KB
Del
OK
customize-preview-widgets.min.js
1.74 KB
Del
OK
customize-preview.js
3.48 KB
Del
OK
customize-preview.min.js
1.82 KB
Del
OK
customize-views.js
5.34 KB
Del
OK
customize-views.min.js
2.88 KB
Del
OK
heartbeat.js
18.52 KB
Del
OK
heartbeat.min.js
4.75 KB
Del
OK
hoverIntent.js
4.82 KB
Del
OK
hoverIntent.min.js
1.06 KB
Del
OK
imgareaselect
-
Del
OK
jcrop
-
Del
OK
jquery
-
Del
OK
json2.js
17 KB
Del
OK
json2.min.js
2.87 KB
Del
OK
masonry.min.js
30.31 KB
Del
OK
mce-view.js
17 KB
Del
OK
mce-view.min.js
7.01 KB
Del
OK
media-audiovideo.js
21.93 KB
Del
OK
media-audiovideo.min.js
11.92 KB
Del
OK
media-editor.js
27.87 KB
Del
OK
media-editor.min.js
9.46 KB
Del
OK
media-models.js
34.55 KB
Del
OK
media-models.min.js
11.46 KB
Del
OK
media-views.js
157.75 KB
Del
OK
media-views.min.js
78.25 KB
Del
OK
mediaelement
-
Del
OK
plupload
-
Del
OK
quicktags.js
18.61 KB
Del
OK
quicktags.min.js
8.83 KB
Del
OK
shortcode.js
10.21 KB
Del
OK
shortcode.min.js
2.49 KB
Del
OK
swfobject.js
9.99 KB
Del
OK
swfupload
-
Del
OK
thickbox
-
Del
OK
tinymce
-
Del
OK
tw-sack.js
4.85 KB
Del
OK
tw-sack.min.js
3.19 KB
Del
OK
underscore.min.js
13.98 KB
Del
OK
utils.js
3.98 KB
Del
OK
utils.min.js
1.67 KB
Del
OK
wp-ajax-response.js
3.04 KB
Del
OK
wp-ajax-response.min.js
2 KB
Del
OK
wp-auth-check.js
3.01 KB
Del
OK
wp-auth-check.min.js
1.61 KB
Del
OK
wp-backbone.js
10.17 KB
Del
OK
wp-backbone.min.js
2.93 KB
Del
OK
wp-list-revisions.js
914 B
Del
OK
wp-list-revisions.min.js
562 B
Del
OK
wp-lists.js
10.91 KB
Del
OK
wp-lists.min.js
7.13 KB
Del
OK
wp-pointer.js
6.45 KB
Del
OK
wp-pointer.min.js
3.53 KB
Del
OK
wp-util.js
3.08 KB
Del
OK
wp-util.min.js
977 B
Del
OK
wpdialog.js
435 B
Del
OK
wpdialog.min.js
237 B
Del
OK
wplink.js
14.66 KB
Del
OK
wplink.min.js
8.06 KB
Del
OK
zxcvbn-async.js
502 B
Del
OK
zxcvbn-async.min.js
317 B
Del
OK
zxcvbn.min.js
682.35 KB
Del
OK
Edit: customize-models.js
/* globals _wpCustomizeHeader, _ */ (function( $, wp ) { var api = wp.customize; 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. * * @constructor * @augments Backbone.Model */ api.HeaderTool.ImageModel = Backbone.Model.extend({ defaults: function() { return { header: { attachment_id: 0, url: '', timestamp: _.now(), thumbnail_url: '' }, choice: '', selected: false, random: false }; }, initialize: function() { this.on('hide', this.hide, this); }, hide: function() { this.set('choice', ''); api('header_image').set('remove-header'); api('header_image_data').set('remove-header'); }, 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); }, 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); }, 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 } ); }, 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 * * @constructor * @augments Backbone.Collection */ api.HeaderTool.ChoiceList = Backbone.Collection.extend({ model: api.HeaderTool.ImageModel, // Ordered from most recently used to least comparator: function(model) { return -model.get('header').timestamp; }, 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.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); } }, maybeAddRandomChoice: function() { if (this.size() === 1) { this.addRandomChoice(); } }, 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 }); }, isRandomChoice: function(choice) { return (/^random-(uploaded|default)-image$/).test(choice); }, shouldHideTitle: function() { return this.size() < 2; }, setImage: function(model) { this.each(function(m) { m.set('selected', false); }); if (model) { model.set('selected', true); } }, removeImage: function() { this.each(function(m) { m.set('selected', false); }); } }); /** * wp.customize.HeaderTool.DefaultsList * * @constructor * @augments wp.customize.HeaderTool.ChoiceList * @augments Backbone.Collection */ api.HeaderTool.DefaultsList = api.HeaderTool.ChoiceList.extend({ initialize: function() { this.type = 'default'; this.data = _wpCustomizeHeader.defaults; api.HeaderTool.ChoiceList.prototype.initialize.apply(this); } }); })( jQuery, window.wp );
Save