Admin header should use bloginfo rather than get_option for blog name
|Reported by:||jhodgdon||Owned by:||anonymous|
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.
Change History (9)
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened