-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Rename wp_in_development_mode()
to wp_is_development_mode()
#4850
Rename wp_in_development_mode()
to wp_is_development_mode()
#4850
Conversation
This is a follow up to [56223] which replaces the `wp_in_` prefix with `wp_is_` to be more consistent with other boolean functions in WordPress, like wp_is_maintenance_mode(), wp_is_recovery_mode(), etc. See #57487.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks! wp_is_development_mode()
would be my preference too.
See comment 6 on #49959 for renaming wp_in_maintenance_mode()
to wp_is_maintenance_mode()
previously.
wp_in_development_mode()
to wp_is_development_mode()
wp_in_development_mode()
to wp_is_development_mode()
and check for 'any'
I've added a new commit to this PR to address @azaozz's comment in https://core.trac.wordpress.org/ticket/57487#comment:55 about the need to support checking for any valid development mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor notes.
I'm not too fussed about the default value but additional unit tests would be dandy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming LGTM, but adding a default value is not a good idea here IMO.
This reverts commit 4412e41.
wp_in_development_mode()
to wp_is_development_mode()
and check for 'any'wp_in_development_mode()
to wp_is_development_mode()
I've committed the name change in https://core.trac.wordpress.org/changeset/56249. The conversation about adding a default value can continue on this PR. |
This is a follow up to [56223] which replaces the
wp_in_
prefix withwp_is_
to be more consistent with other boolean functions in WordPress, like wp_is_maintenance_mode(), wp_is_recovery_mode(), etc.See #57487.
Trac ticket: https://core.trac.wordpress.org/ticket/57487
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.