1

I am trying to update a wordpress plugin. At current time the plugin code displays:

$themes = get_themes();
$theme = get_current_theme();
$templates = $themes[$theme]['Template Files'];

Here the problem is that get_theme() and get_themes() are deprecated, and I have tried to change it to wp_get_theme(), and wp_get_themes(), but it doesnt work.

Does anyone have any idea how to update this? Thanks.

4

1 回答 1

1

Owww... I found out how it is!!!...

  $theme = wp_get_theme();
  $templates = $theme->{'Template Files'};

hope it helps somebody else.

于 2012-09-05T01:33:24.563 回答