Skip to content

Add some more dynamic constants#172

Merged
szepeviktor merged 1 commit intoszepeviktor:masterfrom
johnbillion:patch-3
Mar 29, 2023
Merged

Add some more dynamic constants#172
szepeviktor merged 1 commit intoszepeviktor:masterfrom
johnbillion:patch-3

Conversation

@johnbillion
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Owner

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

@szepeviktor
Copy link
Copy Markdown
Owner

I see! You need both dynamicConstantNames and stubs.

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

$domain = COOKIE_DOMAIN ?: '';

Please help me. When is COOKIE_DOMAIN falsy?

@johnbillion
Copy link
Copy Markdown
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
Copy Markdown
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