Skip to content

Uncessary switch_to_blog for button #196

Description

@Rahe

Hello,

On multisite, whn calling get_favorites_button, the plugin calls the switch_to_blog function even if we already are on the right site.
This triggers the switch_blog hook that many plugins are using for background processes (crons, license etc.)

This could be a great enhancement to check if the curent blog_id is the same as the desired id and remove an expensive function call.

Nicolas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions