Beispiel #1
0
function wpjam_topics_page()
{
    if (current_user_can('manage_options') && isset($_GET['action']) && $_GET['action'] == 'del-openid') {
        delete_user_meta(get_current_user_id(), 'wpjam_openid');
    }
    if (wpjam_topic_get_weixin_user()) {
        $action = isset($_GET['action']) ? $_GET['action'] : '';
        if ($action == 'reply') {
            wpjam_topic_reply_page();
        } else {
            if ($callback = apply_filters('wpjam_topics_action_callback', false, $action)) {
                call_user_func($callback);
            } else {
                wpjam_topic_list_page();
            }
        }
    } else {
        wpjam_topic_setting_page();
    }
}
Beispiel #2
0
function wpjam_topics_page()
{
    if (current_user_can('manage_options') && isset($_GET['action']) && $_GET['action'] == 'del-openid') {
        delete_user_meta(get_current_user_id(), 'wpjam_openid');
    }
    if (wpjam_topic_get_openid()) {
        $action = isset($_GET['action']) ? $_GET['action'] : '';
        if ($action == 'reply') {
            wpjam_topic_reply_page();
        } else {
            wpjam_topic_list_page();
        }
    } else {
        wpjam_topic_setting_page();
    }
}