Opened 3 years ago
Closed 3 years ago
#12275 closed defect (bug) (fixed)
get_themes() returns formatted data
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | General | Version: | 2.9.2 |
| Severity: | normal | Keywords: | has-patch |
| 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)
- 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.
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.
Adds AuthorName to array of theme_data available. Differs from author in that it doesn't have the Author URI link wrapped around it.
- 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?
- Keywords tested added; needs-testing removed
Tested and working.
I think that if the author is not included (Anonymous) it must not be linked by default. You can still get author URI and theme URI calling to them.

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.