[wp-trac] [WordPress Trac] #61565: Rename wp_maintenance to maybe_show_wp_maintenance
WordPress Trac
noreply at wordpress.org
Wed Jul 3 18:41:15 UTC 2024
#61565: Rename wp_maintenance to maybe_show_wp_maintenance
----------------------------+-----------------------------
Reporter: ramon fincken | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: trunk
Severity: normal | Keywords: has-unit-tests
Focuses: |
----------------------------+-----------------------------
Conform [maybe_serialize
https://developer.wordpress.org/reference/functions/maybe_serialize/]
calling wp_maintenance may not result in a maintenance call.
wp_maintenance() calls [wp_is_maintenance_mode()
https://github.com/WordPress/wordpress-develop/blob/6.5/src/wp-
includes/load.php#L374] to determine if the mode should be triggered/shown
or not.
Using wp_maintenance looks a lot like it is going to start a maintenance
no matter what. ( wp_maintenance looks like do_wp_maintenance which does
not exist ).
Therefore I propose a simple change, rewrite the function name to
maybe_show_wp_maintenance for better readability.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61565>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list