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

Replace deprecated get_all_options filter with an action #3682

Open
3 tasks done
RavanH opened this issue Dec 12, 2023 · 1 comment
Open
3 tasks done

Replace deprecated get_all_options filter with an action #3682

RavanH opened this issue Dec 12, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@RavanH
Copy link

RavanH commented Dec 12, 2023

Code of Conduct

Submission validity

  • This is not a personal support request, that should be posted on discussions community.
  • I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.

Summary

Hi, this get_all_options filter has apparently been deprecated and does not allow getting all options anymore. And as far as I can figure, there is no alternative wrapper function available...

Motivation

For effective persistant options caching, plugins like APC Cache and YAPCache depended on the get_all_options filter. This filter has apparently been deprecated and does not allow getting all options anymore. This is needed to populate the cache.

Describe the solution

On includes/Database/Options.php line 78 there is currently yourls_apply_filter('get_all_options', 'deprecated');

What if that was replaced with yourls_do_action('get_all_options', $options); then a cache plugin could hook there and fetch all options at that time to populate the persistant cache.

@RavanH RavanH added the enhancement New feature or request label Dec 12, 2023
RavanH added a commit to RavanH/YOURLS that referenced this issue Dec 12, 2023
@RavanH
Copy link
Author

RavanH commented Dec 13, 2023

Unless the idea is top move all actions (and deprecated filter) in the Options class to their corresponding wrapper functions? In that case, I'll be happy to work on that :)

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

No branches or pull requests

1 participant