[wp-trac] [WordPress Trac] #49967: Remove never-used commented out code in nav-menus.php update add menu block
WordPress Trac
noreply at wordpress.org
Tue Apr 21 08:42:56 UTC 2020
#49967: Remove never-used commented out code in nav-menus.php update add menu block
------------------------------+-----------------------------
Reporter: garrett-eclipse | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version:
Severity: normal | Keywords:
Focuses: coding-standards |
------------------------------+-----------------------------
Hello,
While working on #44286 I noticed there was a piece of commented out code;
{{{#!php
<?php
// $messages[] = '<div id="message" class="updated"><p>' . sprintf( __(
'<strong>%s</strong> has been created.' ), $nav_menu_selected_title ) .
'</p></div>';
}}}
Looking into it the piece of code was only used in a patch that never saw
the light of day, instead in changeset
[https://core.trac.wordpress.org/changeset/23810 23810] for ticket #23770
it was added already commented out.
This code isn't needed as directly after it a wp_redirect is run so the
message handler never executes in this case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49967>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list