Opened 19 years ago
Closed 19 years ago
#3903 closed defect (bug) (fixed)
Admin header should use bloginfo rather than get_option for blog name
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.2 | Priority: | normal |
| Severity: | normal | Version: | 2.1.2 |
| Component: | Administration | Keywords: | has-patch |
| Focuses: | Cc: |
Description
When on the Admin pages of WordPress, admin_header.php puts the blog's name on the screen in big type at the top, by calling get_option('blogname'). This is a problem because it is not really possible to filter this text, to make it look reasonable, and some plugins might want/need to (e.g. Polyglot).
The reason you cannot filter get_option('blogname') is because the options put into the option-setting form from options_general.php (i.e. the General tab of the Options section of the Admin screens) are also derived from get_option. So if you define a filter for get_option_blogname, then that filter will also be used to filter what goes into the option-setting form. But the form needs to display unfiltered actual input so the user can see what is actually in the database.
The solution is to use bloginfo('name') in the admin header in place of get_option('blogname'), because bloginfo can definitely be filtered. Also the blog title displayed on the admin form is then more consistent with the standard used to display the blog's name in the default theme (and many other themes) in the blog header.
Attachments (2)
Change History (9)
#3
@
19 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
The applied fix does not work, because get_bloginfo is not filtered any more than get_option is filtered.
I realize why the fix I had suggested was not applied (because bloginfo echos the result, which means the texturize is not really applied), but definitely the fix that was put in is no good either.
Suggestions?
(In [4982]) Use get_bloginfo to get the blog name. Props jhodgdon. fixes #3903