#18985 closed enhancement (fixed)
twentyeleven_setup should use get_template_directory() instead of __FILE__
Reported by: | TomAuger | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | minor | Version: | 3.2.1 |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
Since this is a pluggable function, which would be over-ridden in the child theme's directory, and since we want to make it as easy as possible for new developers to extend the parent theme, consider
require( get_template_directory() . '/inc/theme-options.php' ); require( get_template_directory() . '/inc/widgets.php' );
instead of using
require( __FILE__ . '/inc/theme-options.php' ); require( __FILE__ . '/inc/widgets.php' );
FILE breaks the theme and throws errors the moment twentyeleven_setup is defined somewhere within the child theme's directory structure, whereas get_template_directory()
will always point to TwentyEleven.
Change History (4)
Note: See
TracTickets for help on using
tickets.
+1 for this change.