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

Don't use get_playlist() to determine the admin pages to render #81

Open
stevegrunwell opened this issue Nov 8, 2021 · 0 comments
Open
Assignees
Labels

Comments

@stevegrunwell
Copy link
Contributor

Currently, WP101\Admin\register_menu_pages() includes a call to Api::get_playlist() to determine whether or not there are videos to show. However, the get_playlist() call is intentionally only cached for a minute, to reduce lag between adding add-ons and them becoming visible within WP Admin.

As a result, the plugin is making a ton of unnecessary requests to the WP101 Plugin SaaS (effectively once/minute whenever someone's in WP Admin), which also bumps the "Last seen" date for the API key even though the site owner may not have been doing anything related to WP101.

To get around this, we should use a different conditional to determine whether or not to load the playlist page that updates far less frequently.

@stevegrunwell stevegrunwell self-assigned this Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant