Skip to content
Browse files

Correct use of get_file_data().

The proper way to do this is with the WP_Theme class.
  • Loading branch information...
1 parent 28940c5 commit 81ce1f383340f4978fc6469b8bf78414fab9a1cd Michael Sisk committed Sep 19, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 webcomic.php
View
6 webcomic.php
@@ -351,12 +351,12 @@ public function setup_theme() {
self::$collection = empty( self::$config[ 'collections' ][ $match[ 0 ] ] ) ? preg_replace( '/_(archive|webcomic|storyline|character)$/', '', array_search( $match[ 1 ], $permalinks ) ) : $match[ 0 ];
}
- $integrate = get_file_data( get_stylesheet_directory() . '/style.css', array( 'webcomic' => 'Webcomic' ) );
+ $theme = new WP_Theme( get_stylesheet_directory(), '' );
- if ( empty( $integrate[ 'webcomic' ] ) ) {
+ if ( $theme->get( 'Webcomic' ) ) {
self::$integrate = true;
} else {
- self::$theme_version = $integrate[ 'webcomic' ];
+ self::$theme_version = $theme->get( 'Webcomic' );
}
}

0 comments on commit 81ce1f3

Please sign in to comment.
Something went wrong with that request. Please try again.