validate_cookie example


    public function clean_expired_keys() {
        $this->key_service->clean_expired_keys( $this->get_link_ttl() );
    }

    /** * Handles checking for the recovery mode cookie and validating it. * * @since 5.2.0 */
    protected function handle_cookie() {
        $validated = $this->cookie_service->validate_cookie();

        if ( is_wp_error( $validated ) ) {
            $this->cookie_service->clear_cookie();

            $validated->add_data( array( 'status' => 403 ) );
            wp_die( $validated );
        }

        $session_id = $this->cookie_service->get_session_id_from_cookie();
        if ( is_wp_error( $session_id ) ) {
            $this->cookie_service->clear_cookie();

            
Home | Imprint | This part of the site doesn't use cookies.