/** * callback when admin notices are being printed */ function _loco_hook_admin_notices() { if (defined('WPLANG') && LocoAdmin::is_self() && WPLANG && 3 < (int) $GLOBALS['wp_version']) { LocoAdmin::warning(Loco::__('WPLANG is deprecated and should be removed from wp-config.php')); } LocoAdmin::flush_notices(); }
<?php /** * Polyfiller for missing PHP json extension. * Simply avoids fatal errors. Doesn't attempt to really replace the functionality */ function loco_compat_json_encode($value) { return '{"error":{"code":-1,"message":"json extension is not installed"}}'; } if (!extension_loaded('json_encode') && WP_DEBUG && (!defined('DOING_AJAX') || !DOING_AJAX)) { LocoAdmin::warning(sprintf(Loco::__('PHP extension "%s" is not installed. If you experience problems you should install it'), 'json_encode')); } if (!function_exists('json_encode')) { function json_encode($value = '') { return loco_compat_json_encode($value); } }
"> <?php Loco::h($label); ?> </a><?php } } ?> <a href="https://localise.biz/about/gettext?<?php Loco::h(Loco::utm_query('nav')); ?> " class="nav-tab nav-tab-loco" target="_blank"> <?php Loco::h(Loco::__('Powered by')); ?> <?php Loco::h(Loco::__('Loco, Translation Management')); ?> </a> </h2> <!--[if lt IE 9]><?php LocoAdmin::warning(__($ignore = 'Your browser is out of date!') . ' ' . Loco::html(Loco::__('Loco may not work as expected'))); ?> <![endif]-->
<?php } ?> </span> — <span id="loco-po-status"> <!-- js will load status --> </span> </span> </h3> <?php foreach ($warnings as $text) { LocoAdmin::warning($text); } ?> <div id="loco-poedit"> <nav id="loco-nav" class="wp-core-ui"> <form action="<?php echo $phpbase; ?> /loco-fail.php" method="post"> <input type="hidden" name="po" value="" /> <input type="hidden" name="path" value="<?php Loco::h($path);
<?php /** * Warns about missing PHP glob functionality under Solaris */ if (!defined('GLOB_BRACE') && (!defined('DOING_AJAX') || !DOING_AJAX)) { define('GLOB_BRACE', 0); LocoAdmin::warning(Loco::__("Loco Translate will not work properly on this server's operating system")); }