Created
July 18, 2014 14:42
-
-
Save jeffikus/b18a7d32736bc76e8609 to your computer and use it in GitHub Desktop.
Fix for deprecated function - get_theme_data() with wp_get_theme()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'after_setup_theme', 'woothemes_setup' ); | |
if ( ! function_exists( 'woothemes_setup' ) ) { | |
function woothemes_setup () { | |
// This theme styles the visual editor with editor-style.css to match the theme style. | |
if ( locate_template( 'editor-style.css' ) != '' ) { add_editor_style(); } | |
// Add default posts and comments RSS feed links to head | |
add_theme_support( 'automatic-feed-links' ); | |
if ( is_child_theme() ) { | |
$theme_data = wp_get_theme(); | |
define( 'CHILD_THEME_URL', $theme_data->get( 'ThemeURI' ) ); | |
define( 'CHILD_THEME_NAME', $theme_data->get( 'Name' ) ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment