Skip to content

Conversation

IanDelMar
Copy link
Contributor

If shortcode_exists($tag) returns true, the given $tag must be a valid shortcode tag. A valid shortcode tag is a non-empty-string. Because '0' is permitted as a shortcode tag, a valid shortcode tag is not necessarily a non-falsy-string.

@szepeviktor
Copy link
Member

Please go with non-falsy-string. This package officially does not support 0.

@IanDelMar
Copy link
Contributor Author

Are you sure? Do we gain much from using non-falsy-string compared with non-empty-string in this context?

@szepeviktor
Copy link
Member

Keep away crazy ideas: [0 nicety=max]

@szepeviktor szepeviktor merged commit ba070da into php-stubs:master Sep 9, 2025
7 checks passed
@IanDelMar IanDelMar deleted the shortcode_exists branch September 9, 2025 18:30
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