-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Additional WP Constants #275
Comments
Hello Glynn 👋🏻 Do these constants have a core function? |
yeah they are defined by https://developer.wordpress.org/reference/functions/wp_plugin_directory_constants/ |
I mean to read them. |
I'd like to end up at this question: Are they supposed to be used my plugins? |
... and at this answer: I know there are use-cases when you have to use them, |
We use them in our code (themes and plugins) and our attempts at as PHPStan see these being flagged as not found. I appreciate we could add them to our bootstrap, but we wasn't sure if this is something that should be included with the other core constants on the included bootstrap 🤷🏼 |
Could you share one line of code? |
Here is one example (not as an enqueue, i cant remember what project thats in ) where we allow a user to put images in the root of the uploads dir, then get all the files as paths and covert them into urls |
I see. |
BTW That line is dangerous. One is a filesystem path, the other is a URL. |
Would it be possible to add the following constants to the bootstrap file? i know the paths are present, but URLs are useful for enqueued scripts etc
Many thanks
The text was updated successfully, but these errors were encountered: