| Server IP : 69.39.225.240 / Your IP : 216.73.216.138 Web Server : Apache System : Linux bronze7.serverhost.net 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : reademotions ( 1074) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/reademotions/www/wp-content/plugins/loco-translate/src/compat/ |
Upload File : |
<?php
/**
* Placeholder for missing PHP "json" extension.
* Just avoids fatal errors. Does not actually replace functionality.
*
* If this extension is missing no JavaScript will work in the plugin at all.
*/
abstract class Loco_compat_JsonExtension {
public static function json_encode( $value ){
return '{"error":{"code":-1,"message":"json extension is not installed"}}';
}
public static function json_decode( $json ){
return null;
}
}
// @codeCoverageIgnoreStart
if( ! function_exists('json_encode') ){
function json_encode( $value ){
return Loco_compat_JsonExtension::json_encode( $value );
}
}
if( ! function_exists('json_decode') ){
function json_decode( $json ){
return Loco_compat_JsonExtension::json_decode($json);
}
}