WordPress.org

Support

Support » Plugins and Hacks » Override Pluggable functions

Override Pluggable functions

  • Hello,

    This should be simple but i’m having no luck and searching has not come up with a result.

    I am trying to override the pluggable method wp_logout. I have disabled all other plugins, but it appears that the method is being called within pluggable.php before my plugin. Here is what I have in my plugin:

    http://pastebin.com/P8kh7PtG

    Any suggestions? Any help is greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • On further investigation is appears that when logging out wp_logout() isn’t even called at all. I temporarily added an output to the core implementation and it was never activated.

    The user is logged out though, how can this be?

    hotwebideas
    Member

    @hotwebideas

    It appears that wp_logout() may have already executed in pluggable.php or your own pluggable version was delayed by a conditional. I would suggest adding another pluggable function <?php get_user_by($field, $value) ?> and see if it returns false. You can always add more conditional code in your plugin to test for this and isolate the cause.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Override Pluggable functions’ is closed to new replies.