£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyʦ•ꎅȮFÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~芩ÊÇí`ÔÑ©ú뙵'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ӽ㞪éUWŸÈË%DÒÕ¬ï‘]/Åcx ‰ï2ß]ä6G[]S£Ôϯrs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ( function ( $ ) { 'use strict'; $.SmileTrigger = $.SmileTrigger || {}; $.SmileTrigger.wp_media = $.SmileTrigger.wp_media || []; $.SmileTrigger.media_new = function () { const $body = $( 'body' ); $body.on( 'click', '.smile_upload_icon', $.SmileTrigger.media_new_activate ); }; //intended for zip files only. if needed should be easy to expand in the future $.SmileTrigger.media_new_activate = function ( event ) { event.preventDefault(); const clicked = $( this ), options = clicked.data(); options.input_target = $( '#' + options.target ); // Create the media frame. const file_frame = wp.media( { frame: options.frame, library: { type: options.type }, button: { text: options.button }, className: options.class, } ); file_frame.on( 'select update insert', function () { $.SmileTrigger.media_new_insert( file_frame, options ); } ); //open the media frame file_frame.open(); }; //insert the url of the zip file $.SmileTrigger.media_new_insert = function ( file_frame, options ) { const state = file_frame.state(), selection = state.get( 'selection' ).first().toJSON(); options.input_target.val( selection.id ).trigger( 'change' ); $( 'body' ).trigger( options.trigger, [ selection, options ] ); }; $( document ).ready( function () { $.SmileTrigger.media_new(); //Fonts Zip file upload $( 'body' ).on( 'smile_insert_zip', $.SmileTrigger.icon_insert ); //font manager $( 'body' ).on( 'click', '.smile_del_icon', $.SmileTrigger.icon_remove ); } ); /** * @param event * @param selection * @param options */ $.SmileTrigger.icon_insert = function ( event, selection, options ) { // clean the options field, we dont need to save a value options.input_target.val( '' ); const manager = $( '.smile_iconfont_manager' ); const msg = $( '#msg' ); const proceed = selection.subtype == 'zip' || selection.subtype == 'x-zip' ? true : false; if ( proceed == false ) { $( '.spinner' ).hide(); msg.html( "
Please upload a valid ZIP file.
You can create the file on icomoon.io
Couldn't add the font because the server didn’t respond. Please reload the page, then try again.
Font icon added successfully! Reloading the page...
Couldn't add the font.
The script returned the following error: " +
response +
'
Couldn't remove the font because the server didn’t respond.
Please reload the page, then try again
Icon set deleted successfully! Reloading the page...
Couldn't remove the font.
Reloading the page...