Opened 11 months ago
Closed 11 months ago
#21067 closed defect (bug) (invalid)
wp_get_theme() returns the ThemeURI and AuthorURI but cannot access them.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 3.4 |
| Severity: | normal | Keywords: | close |
| Cc: |
Description
$theme = wp_get_theme(); returns the whole array with all the required data, but we cannot access $theme->AuthorURI, $theme->ThemeURI from that array. Not sure if this WordPress bug or not. But it doesnot work in Twentyeleven theme too.
Change History (4)
comment:3
SergeyBiryukov — 11 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
comment:4
SergeyBiryukov — 11 months ago
- Component changed from General to Themes
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from reopened to closed
Note: See
TracTickets for help on using
tickets.

AuthorURI and ThemeURI have never been accessible properties when getting the current theme (current_theme_info() in 3.3).
To get these values you should use the get() method:
$theme = wp_get_theme(); $theme->get('AuthorURI');