Reputation: 1747
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.
Upvotes: 1
Views: 306
Reputation: 1747
Owww... I found out how it is!!!...
$theme = wp_get_theme();
$templates = $theme->{'Template Files'};
hope it helps somebody else.
Upvotes: 2