UCF / Theme-Updater

A theme updater for GitHub hosted Wordpress themes. This Wordpress plugin automatically checks GitHub for theme updates and enables automatic install.
107 stars 35 forks source link

WordPress.org - suggestion about adding extra theme headers #6

Closed danyork closed 12 years ago

danyork commented 12 years ago

http://wordpress.org/support/topic/plugin-theme-updater-adding-extra-theme-headers?replies=1

Over on WordPress.org there is a suggestion about a way to add extra theme headers. The suggestion is copied here:


Unfortunately Theme URI is not available via default get_theme_data(), which is probably for the best because I don't want to conflict with standard wordpress conventions.

Couldn't you do:

add_action( 'extra_theme_headers', 'frosty_extra_theme_headers' );
function frosty_extra_theme_headers( $headers ) {
    $headers['Github Theme URI'] = 'Github Theme URI';
    return $headers;
}

Then you can call:

$theme_data = get_theme_data( '/style.css' );
$theme_data['Github Theme URI']

beck commented 12 years ago

Thanks for pointing this out, didn't know about the extra_theme_headers filter.