コード例 #1
0
<?php

wp_session_unset();
コード例 #2
0
/**
 * Destroy Session
 *
 * @return void
 */
function cx_destroy_session()
{
    global $CX;
    if (CX_PHP_SESSIONS) {
        $CX->session->set('user_data', NULL);
        session_destroy();
    } else {
        // Destroy session
        wp_session_unset();
        // Clean expired sessions from DB
        wp_session_cleanup();
        // Reassign WP Session
        $CX->session = WP_Session::get_instance();
    }
}