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

New filter for RT_WP_NGINX_HELPER_CACHE_PATH default constant value #298

Open
SGr33n opened this issue Feb 24, 2023 · 0 comments
Open

New filter for RT_WP_NGINX_HELPER_CACHE_PATH default constant value #298

SGr33n opened this issue Feb 24, 2023 · 0 comments

Comments

@SGr33n
Copy link

SGr33n commented Feb 24, 2023

HI!
Today I’m developing a plug-in that should change the value of RT_WP_nginx_helper_cache_path. However, I am noticing that even if I give maximum priority to the definition of this constant, the one set on the Nginx_helper class is always the one that set the value.

This would be due to the fact that the plug-in I am developing has the name that starts for S, while nginx-helper starts with N, so it is loaded before and I cannot configure the wanted value unless I set it up in the wp-config.php.

At this point I would like to ask if it was possible to add a filter:

class-nginx-helper.php line 87

		if ( ! defined( 'RT_WP_NGINX_HELPER_CACHE_PATH' ) ) {
			define( 'RT_WP_NGINX_HELPER_CACHE_PATH', apply_filters( 'rt_nginx_helper_cache_path', '/var/run/nginx-cache' ) );
		}

In this way it would be much easier to set a custom value of RT_WP_NGINX_HELPER_CACHE_PATH.

Thank you!

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