WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#21067 closed defect (bug) (invalid)

wp_get_theme() returns the ThemeURI and AuthorURI but cannot access them.

Reported by: kcssm Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: Themes Keywords: close
Focuses: 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:1 @duck_3 years ago

  • Keywords close added

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');

comment:2 @kcssm3 years ago

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 @SergeyBiryukov3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 @SergeyBiryukov3 years 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.