wp-theme-metadata
v1.0.0
Published
Port of WordPress wp_get_theme
Downloads
2
Readme
wp-theme-metadata
Get WordPress theme information from NodeJS.
Port of WordPress wp_get_theme
.
Installation
> npm install https://github.com/dkfiresky-wp/wp-theme-metadata.git
Usage
const themeMetadata = require( 'wp-theme-metadata' );
themeMetadata( '/wordpress/wp-content/twentysixteen/style.css', ( error, result ) => {
if ( null !== error) throw error;
console.log( result );
} );
// The above will provide information like:
{
'Name': 'Twenty Sixteen',
'ThemeURI': 'https://wordpress.org/themes/twentysixteen/',
'Description': 'Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere.',
'Author': 'the WordPress team',
'AuthorURI': 'https://wordpress.org/',
'Version': '1.3',
'License': 'GNU General Public License v2 or later',
'LicenseURI': 'http://www.gnu.org/licenses/gpl-2.0.html',
'Tags': 'one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog',
'TextDomain': 'twentysixteen'
}