Opened 15 years ago
Closed 15 years ago
#12275 closed defect (bug) (fixed)
get_themes() returns formatted data
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9.2 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
WP 2.9 has changed the way get_themes() functions. The variable 'Author' is now a formatted link which even includes a TITLE tag.
This makes it easier to generate the Themes subpage. However, I would think that this function should return an array with unformatted raw data from style.css.
Please, change this.
Best regards
Attachments (1)
Change History (8)
#2
in reply to:
↑ 1
@
15 years ago
- Keywords dev-feedback added; get_themes() removed
Replying to nacin:
Not sure if changing it back is worth it, but this sounds like it is due to abstraction to get_file_data(). Setting to 3.0 for review.
Ping me if you'd like any type of patch for this. I checked in theme.php and its set on line 230. I'm not sure if its worth changing back. I did a quick look to see what else uses that information. Most if it is - surprise - on the theme admin pages. All instances I saw are being printed with printf functions. In those cases, its nice that the author is delivered with the AuthorURI link already embeded so that we don't have to build the link in every instance.
I don't think it would be worth changing it back because we'd have to update the code everywhere that its currently used (to build the link using AuthorURI).
If you feel like its important enough, I could add another key to the $theme_data array, returning [ 'AuthorName' ] or something.
#3
@
15 years ago
If you feel like its important enough, I could add another key to the $theme_data array, returning [ 'AuthorName' ] or something.
Adding another key seems like a decent compromise.
@
15 years ago
Adds AuthorName to array of theme_data available. Differs from author in that it doesn't have the Author URI link wrapped around it.
#4
@
15 years ago
- Keywords has-patch needs-testing added; dev-feedback removed
I tested the above patch and all seemed well. Extra eyes never hurts though.
Not directly related to this ticket, but I noticed while testing that if author name is not included and author uri is included, anonymous isn't linked. Do we care about that?
Not sure if changing it back is worth it, but this sounds like it is due to abstraction to get_file_data(). Setting to 3.0 for review.