WC_Helper::get_local_themes()
Get locally installed themes.
Method of the class: WC_Helper{}
No Hooks.
Return
Array
.
Usage
$result = WC_Helper::get_local_themes();
WC_Helper::get_local_themes() WC Helper::get local themes code WC 9.6.1
public static function get_local_themes() { if ( ! function_exists( 'wp_get_themes' ) ) { require_once ABSPATH . 'wp-admin/includes/theme.php'; } $themes = wp_get_themes(); $output_themes = array(); foreach ( $themes as $theme ) { array_push( $output_themes, array( '_filename' => $theme->get_stylesheet() . '/style.css', '_stylesheet' => $theme->get_stylesheet(), '_type' => 'theme', 'slug' => $theme->get_stylesheet(), 'Version' => $theme->get( 'Version' ), ) ); } return $output_themes; }