Make WordPress Core

Ticket #49533: 49533.patch

File 49533.patch, 483 bytes (added by rebasaurus, 4 years ago)

Added pre_wp_logout action before used is logged out.

  • wp-includes/pluggable.php

    diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
    index 3de1934044..d827b045da 100644
    a b if ( ! function_exists( 'wp_logout' ) ) : 
    573573         * @since 2.5.0
    574574         */
    575575        function wp_logout() {
     576                /**
     577                 * Fires before a user is logged-out.
     578                 *
     579                 * @since 5.5
     580                 */
     581                do_action( 'pre_wp_logout' );
     582               
    576583                wp_destroy_current_session();
    577584                wp_clear_auth_cookie();
    578585                wp_set_current_user( 0 );