Permalink
Browse files

Just use the first parameter of wp_get_theme() when grabbing info abo…

…ut the parent theme.
  • Loading branch information...
1 parent 06dd039 commit 5ac321704e8814d39802ee85c129a8ea1028a676 @justintadlock committed Jul 24, 2013
View
2 admin/admin.php
@@ -104,7 +104,7 @@ function hybrid_get_post_templates( $post_type = 'post' ) {
$post_type_object = get_post_type_object( $post_type );
/* Get the theme (parent theme if using a child theme) object. */
- $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $theme = wp_get_theme( get_template() );
/* Get the theme PHP files one level deep. */
$files = (array) $theme->get_files( 'php', 1 );
View
4 admin/meta-box-theme-about.php
@@ -25,7 +25,7 @@ function hybrid_meta_box_theme_add_about() {
/* Get theme information. */
$prefix = hybrid_get_prefix();
- $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $theme = wp_get_theme( get_template() );
/* Adds the About box for the parent theme. */
add_meta_box( 'hybrid-core-about-theme', sprintf( __( 'About %s', 'hybrid-core' ), $theme->get( 'Name' ) ), 'hybrid_meta_box_theme_display_about', hybrid_get_settings_page_name(), 'side', 'high' );
@@ -53,7 +53,7 @@ function hybrid_meta_box_theme_display_about( $object, $box ) {
$prefix = hybrid_get_prefix();
/* Grab theme information for the parent/child theme. */
- $theme = ( 'hybrid-core-about-child' == $box['id'] ) ? wp_get_theme() : wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); ?>
+ $theme = ( 'hybrid-core-about-child' == $box['id'] ) ? wp_get_theme() : wp_get_theme( get_template() ); ?>
<table class="form-table">
<tr>
View
6 admin/theme-settings.php
@@ -32,7 +32,7 @@ function hybrid_settings_page_init() {
global $hybrid;
/* Get theme information. */
- $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $theme = wp_get_theme( get_template() );
$prefix = hybrid_get_prefix();
/* Register theme settings. */
@@ -160,7 +160,7 @@ function hybrid_settings_page() {
/* Get the theme information. */
$prefix = hybrid_get_prefix();
- $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $theme = wp_get_theme( get_template() );
do_action( "{$prefix}_before_settings_page" ); ?>
@@ -247,7 +247,7 @@ function hybrid_settings_field_name( $setting ) {
function hybrid_settings_page_help() {
/* Get the parent theme data. */
- $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $theme = wp_get_theme( get_template() );
$doc_uri = $theme->get( 'Documentation URI' );
$support_uri = $theme->get( 'Support URI' );
View
2 functions/i18n.php
@@ -95,7 +95,7 @@ function hybrid_get_parent_textdomain() {
/* If the global textdomain isn't set, define it. Plugin/theme authors may also define a custom textdomain. */
if ( empty( $hybrid->parent_textdomain ) ) {
- $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $theme = wp_get_theme( get_template() );
$textdomain = $theme->get( 'TextDomain' ) ? $theme->get( 'TextDomain' ) : get_template();
View
2 functions/shortcodes.php
@@ -169,7 +169,7 @@ function hybrid_wp_link_shortcode() {
* @return string
*/
function hybrid_theme_link_shortcode() {
- $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $theme = wp_get_theme( get_template() );
return '<a class="theme-link" href="' . esc_url( $theme->get( 'ThemeURI' ) ) . '" title="' . sprintf( esc_attr__( '%s WordPress Theme', 'hybrid-core' ), $theme->get( 'Name' ) ) . '"><span>' . esc_attr( $theme->get( 'Name' ) ) . '</span></a>';
}
View
2 functions/styles.php
@@ -116,7 +116,7 @@ function hybrid_get_styles() {
/* If a child theme is active, add the parent theme's style. */
if ( is_child_theme() ) {
- $parent = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $parent = wp_get_theme( get_template() );
/* Get the parent theme stylesheet. */
$src = trailingslashit( THEME_URI ) . "style.css";
View
2 functions/utility.php
@@ -83,7 +83,7 @@ function hybrid_extra_theme_headers( $headers ) {
* @return void
*/
function hybrid_meta_template() {
- $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) );
+ $theme = wp_get_theme( get_template() );
$template = '<meta name="template" content="' . esc_attr( $theme->get( 'Name' ) . ' ' . $theme->get( 'Version' ) ) . '" />' . "\n";
echo apply_atomic( 'meta_template', $template );
}

0 comments on commit 5ac3217

Please sign in to comment.