Ejemplo n.º 1
0
/**
 * registra os headers para o registro customizado
 */
function custom_register_header()
{
    if (get_query_var('custom_user_register')) {
        if (class_exists('siCaptcha', false)) {
            global $registro_captcha;
            global $_SESSION;
            $registro_captcha = new siCaptcha();
            if (!headers_sent()) {
                $registro_captcha->si_captcha_start_session();
            }
            if (!isset($_SESSION)) {
                $_SESSION = array('setup_si' => true);
            }
        }
        wp_enqueue_script('jquery_validate', WPMU_PLUGIN_URL . '/js/jquery.validate.min.js', array('jquery'));
        wp_enqueue_script('jquery_validate_messages', WPMU_PLUGIN_URL . '/js/jquery.validate.messages_pt_BR.js', array('jquery', 'jquery_validate'));
    }
}
Ejemplo n.º 2
0
// Pre-2.8 compatibility
if (!function_exists('esc_html')) {
    function esc_html($text)
    {
        return wp_specialchars($text);
    }
}
// Pre-2.8 compatibility
if (!function_exists('esc_attr')) {
    function esc_attr($text)
    {
        return attribute_escape($text);
    }
}
if (class_exists("siCaptcha")) {
    $si_image_captcha = new siCaptcha();
}
if (isset($si_image_captcha)) {
    global $wp_version;
    // WordPress MU detection
    //    0  Regular WordPress installation
    //    1  WordPress MU Forced Activated
    //    2  WordPress MU Optional Activation
    $wpmu = 0;
    if (basename(dirname(__FILE__)) == "mu-plugins") {
        // forced activated
        $wpmu = 1;
    } else {
        if (basename(dirname(__FILE__)) == "si-captcha-for-wordpress" && function_exists('is_site_admin')) {
            // optionally activated
            $wpmu = 2;