Skip to content

Instantly share code, notes, and snippets.

@jeffikus
Created July 18, 2014 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffikus/b18a7d32736bc76e8609 to your computer and use it in GitHub Desktop.
Save jeffikus/b18a7d32736bc76e8609 to your computer and use it in GitHub Desktop.
Fix for deprecated function - get_theme_data() with wp_get_theme()
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