Пример #1
0
function use_denglu_bind()
{
    global $wptm_connect;
    if ($wptm_connect['enable_connect'] && empty($wptm_connect['denglu_bind']) && function_exists('wp_connect_comments') && !install_comments()) {
        return false;
    }
    return true;
}
Пример #2
0
<?php

include_once dirname(__FILE__) . '/config.php';
$login_loaded = 1;
add_action('init', 'wp_connect_init');
// 添加登录按钮
if ($wptm_connect['enable_connect']) {
    add_action("login_form", "wp_connect");
    add_action("register_form", "wp_connect", 12);
    add_action("login_form_register", "connect_login_form_login");
    add_action("login_form_login", "connect_login_form_login");
    add_action("login_form_logout", "connect_login_form_logout");
}
// 社会化评论
if (!function_exists('denglu_comments') && install_comments()) {
    if (!$wptm_comment['manual']) {
        add_filter('comments_template', 'denglu_comments');
        function denglu_comments($file)
        {
            global $post;
            if (comments_open()) {
                return dirname(__FILE__) . '/comments.php';
            }
        }
    }
} elseif ($wptm_connect['enable_connect']) {
    if (!$wptm_connect['manual'] || $wptm_connect['manual'] == 2) {
        add_action('comment_form', 'wp_connect');
    }
    if (!use_denglu_bind()) {
        add_action('comment_post', 'wp_connect_comments', 100);