Permalink
Browse files

Never assume there's a trailing slash. Use trailingslashit().

  • Loading branch information...
1 parent 87b5704 commit 178b520b85b6f13266ff0bb236a10b3edbde0d50 @justintadlock committed Aug 25, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 functions.php
View
@@ -47,11 +47,11 @@ function news_theme_setup() {
$prefix = hybrid_get_prefix();
/* Load shortcodes file. */
- require_once( THEME_DIR . '/functions/shortcodes.php' );
+ require_once( trailingslashit( THEME_DIR ) . 'functions/shortcodes.php' );
/* Load admin functions. */
if ( is_admin() )
- require_once( THEME_DIR . '/functions/admin.php' );
+ require_once( trailingslashit( THEME_DIR ) . 'functions/admin.php' );
/* Add theme support for WordPress features. */
add_theme_support( 'automatic-feed-links' );
@@ -146,16 +146,16 @@ function news_register_widgets() {
/* Load the popular tabs widget. */
if ( current_theme_supports( 'entry-views' ) ) {
- require_once( THEME_DIR . '/classes/widget-popular-tabs.php' );
+ require_once( trailingslashit( THEME_DIR ) . 'classes/widget-popular-tabs.php' );
register_widget( 'News_Widget_Popular_Tabs' );
}
/* Load the image stream widget. */
- require_once( THEME_DIR . '/classes/widget-image-stream.php' );
+ require_once( trailingslashit( THEME_DIR ) . 'classes/widget-image-stream.php' );
register_widget( 'News_Widget_Image_Stream' );
/* Load the newsletter widget. */
- require_once( THEME_DIR . '/classes/widget-newsletter.php' );
+ require_once( trailingslashit( THEME_DIR ) . 'classes/widget-newsletter.php' );
register_widget( 'News_Widget_Newsletter' );
}
@@ -166,7 +166,7 @@ function news_register_widgets() {
*/
function news_enqueue_script() {
wp_enqueue_script( 'jquery-ui-tabs' );
- wp_enqueue_script( 'news-theme', THEME_URI . '/js/news-theme.js', array( 'jquery' ), 0.1, true );
+ wp_enqueue_script( 'news-theme', trailingslashit( THEME_URI ) . 'js/news-theme.js', array( 'jquery' ), 0.1, true );
}
/**

0 comments on commit 178b520

Please sign in to comment.