Opened 13 years ago
Closed 12 years ago
#20062 closed defect (bug) (fixed)
Don't use $title as var name if it's in global context
Reported by: | ocean90 | Owned by: | |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
In admin-header.php
we declare $title
as a global variable. $title
should be used for setting up the title of the page.
In wp-admin/themes.php
line 240 we are using $title
as a variable name, but not for setting up the title.
A result of this is, that get_admin_page_title()
can return a wrong title. (In this case a broken theme name.)
Attachments (1)
Change History (5)
#2
@
13 years ago
Let's consider reducing our reliance on $title. Perhaps introduce set_admin_page_title( $title = null ), where if null it returns the set value. Then we take a $title and set it in admin-header, and use it inside get_admin_page_title(). Kills reliance on the global (while we could still set it up, if we wanted).
Note: See
TracTickets for help on using
tickets.
In [19941]: