예제 #1
0
/**
 * 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();
}
예제 #2
0
파일: loco-json.php 프로젝트: jonpalma/bcc
<?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);
    }
}
예제 #3
0
">
                <?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]-->
예제 #4
0
            <?php 
}
?>
 
            </span>
            &mdash;
            <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);
예제 #5
0
<?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"));
}