| Server IP : 188.114.97.2 / Your IP : 104.23.197.231 Web Server : Apache/2.4.59 (Debian) System : Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64 User : edlftp ( 1002) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/nicolasj/www/ecoledelangues.be/wp-content/plugins/wp-optimize/js/ |
Upload File : |
function wpo_parse_json(e){if("object"==typeof e)return e;try{var o=JSON.parse(e);return o}catch(t){console.log("WPO: Exception when trying to parse JSON (1) - will attempt to fix/re-parse"),console.log(e)}var r=e.indexOf("{"),i=e.lastIndexOf("}");if(r>-1&&i>-1){var n=e.slice(r,i+1);try{var s=JSON.parse(n);return s}catch(t){console.log("WPO: Exception when trying to parse JSON (2) - will attempt to fix/re-parse based upon bracket counting");for(var c=r,a=0,p="",d=!1;(a>0||c==r)&&c<=i;){var u=e.charAt(c);d||"{"!=u?d||"}"!=u?'"'==u&&"\\"!=p&&(d=!d):a--:a++,p=u,c++}console.log("Started at cursor="+r+", ended at cursor="+c+" with result following:"),console.log(e.substring(r,c));try{var s=JSON.parse(e.substring(r,c));return s}catch(t){throw t}}}throw"WPO: could not parse the JSON"}var wp_optimize=window.wp_optimize||{};wp_optimize.send_command=function(e,o,t,r,i){r="undefined"==typeof r||r,o||(o={}),o.hasOwnProperty("include_ui_elements")||(o.include_ui_elements=!0);var n={action:"wp_optimize_ajax",subaction:e,nonce:wp_optimize_send_command_data.nonce,data:o},s={type:"post",data:n,success:function(e){if(r){try{var o=wpo_parse_json(e)}catch(i){return console.log(i),console.log(e),void alert(wpoptimize.error_unexpected_response)}if(!o.result&&o.hasOwnProperty("error_code")&&o.error_code)return void wp_optimize.notices.show_notice(o.error_code,o.error_message);"function"==typeof t&&t(o)}else{if(!e.result&&e.hasOwnProperty("error_code")&&e.error_code)return void wp_optimize.notices.show_notice(e.error_code,e.error_message);"function"==typeof t&&t(e)}}};return"object"==typeof i&&(i.hasOwnProperty("timeout")&&(s.timeout=i.timeout),i.hasOwnProperty("error")&&"function"==typeof i.error&&(s.error=i.error)),jQuery.ajax(ajaxurl,s)},wp_optimize.notices={errors:[],show_notice:function(e,o){jQuery("#wp-optimize-wrap").length?(this.notice||this.add_notice(),this.notice.show(),this.errors[e]||(this.errors[e]=jQuery("<p/>").html(o).appendTo(this.notice).data("error_code",e))):window.wp&&wp.hasOwnProperty("data")?wp.data.dispatch("core/notices").createNotice("error","WP-Optimize: "+o,{isDismissible:!0}):alert("WP-Optimize: "+o)},add_notice:function(){this.notice_container=jQuery('<div class="wpo-main-error-notice"></div>').prependTo("#wp-optimize-wrap"),this.notice=jQuery('<div class="notice notice-error wpo-notice is-dismissible"><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+commonL10n.dismiss+"</span></button></div>"),this.notice.appendTo(this.notice_container),this.notice.on("click",".notice-dismiss",function(e){this.notice.hide().find("p").remove(),this.errors=[]}.bind(this))}};