Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncessary switch_to_blog for button #196

Open
Rahe opened this issue Jun 19, 2024 · 0 comments
Open

Uncessary switch_to_blog for button #196

Rahe opened this issue Jun 19, 2024 · 0 comments

Comments

@Rahe
Copy link

Rahe commented Jun 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant