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

Add WP_LANG_DIR constant #212

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Conversation

swissspidy
Copy link
Sponsor Contributor

Defined in wp_set_lang_dir().

There is no function to read this constant.

Related:

@szepeviktor
Copy link
Owner

szepeviktor commented Feb 26, 2024

There is no function to read this constant.

And you should not read that constant.

@szepeviktor szepeviktor merged commit 3a8e8a9 into szepeviktor:master Feb 26, 2024
1 of 2 checks passed
@johnbillion
Copy link
Sponsor Contributor

Should this go into dynamicConstantNames too?

@szepeviktor
Copy link
Owner

Should this go into dynamicConstantNames too?

No, this is always a non-empty string - PHPStan does not care what its value is.

@swissspidy swissspidy deleted the add/wp-lang-dir branch February 26, 2024 13:54
@szepeviktor
Copy link
Owner

Pascal must have a special plugin that is fiddling with translations...

@swissspidy
Copy link
Sponsor Contributor Author

Hehe just working on adding PHPStan to my Preferred Languages plugin :) swissspidy/preferred-languages#961

@gritdigital-mibu
Copy link

Having this issue with WP_CONTENT_DIR too. WP core just refers directly to the constant / no function to read. 🫠

@gritdigital-mibu
Copy link

There is WP_Filesystem_Base::wp_content_dir() but it's not available where I need it. Anyways, I'm rambling. 😅

@swissspidy
Copy link
Sponsor Contributor Author

@gritdigital-mibu Feel free to submit a PR for WP_CONTENT_DIR :)

@westonruter
Copy link
Sponsor Contributor

Feel free to submit a PR for WP_CONTENT_DIR :)

Proposed in #216

@szepeviktor
Copy link
Owner

@gritdigital-mibu You've got a new release.
https://github.com/szepeviktor/phpstan-wordpress/releases/tag/v1.3.4

@gritdigital-mibu
Copy link

Fab.! Ty ❤️

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

Successfully merging this pull request may close these issues.

None yet

5 participants