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 some more dynamic constants #172

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Add some more dynamic constants #172

merged 1 commit into from
Mar 29, 2023

Conversation

johnbillion
Copy link
Contributor

This list is potentially endless, but here are two more constants that I've had to add to the dynamicConstantNames list in my own plugins.

@szepeviktor
Copy link
Owner

szepeviktor commented Mar 29, 2023

This list is potentially endless

You are right.
We have this rotten tomato for globals: https://github.com/php-stubs/wordpress-globals

This project contains only "popular" constants.

@szepeviktor
Copy link
Owner

For you John, I would merge this one if you need it badly!

@szepeviktor
Copy link
Owner

I see! You need both dynamicConstantNames and stubs.

@szepeviktor szepeviktor merged commit 42bca31 into szepeviktor:master Mar 29, 2023
@szepeviktor
Copy link
Owner

$domain = COOKIE_DOMAIN ?: '';

Please help me. When is COOKIE_DOMAIN falsy?

@johnbillion
Copy link
Contributor Author

Its default value is false if it's not defined anywhere else. https://github.com/WordPress/wordpress-develop/blob/dbbc9bcf98787fd77fd920df84cc9bbc69974b0a/src/wp-includes/default-constants.php#L317

@johnbillion johnbillion deleted the patch-3 branch March 29, 2023 11:11
@szepeviktor
Copy link
Owner

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

Successfully merging this pull request may close these issues.

2 participants