From 53968da5e270c96cb517729cba8c582096720a1e Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 29 Jun 2014 22:23:15 +0000 Subject: [PATCH] `WP_Scripts->in_default_dir()` should use the `WPINC` constant Props wojtek.szkutnik See #14157. Built from https://develop.svn.wordpress.org/trunk@28907 git-svn-id: http://core.svn.wordpress.org/trunk@28706 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class.wp-scripts.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index a4dde7b1b5..89a9ec91d4 100644 --- a/wp-includes/class.wp-scripts.php +++ b/wp-includes/class.wp-scripts.php @@ -218,16 +218,19 @@ class WP_Scripts extends WP_Dependencies { return $this->done; } - public function in_default_dir($src) { - if ( ! $this->default_dirs ) + public function in_default_dir( $src ) { + if ( ! $this->default_dirs ) { return true; + } - if ( 0 === strpos( $src, '/wp-includes/js/l10n' ) ) + if ( 0 === strpos( $src, '/' . WPINC . '/js/l10n' ) ) { return false; + } foreach ( (array) $this->default_dirs as $test ) { - if ( 0 === strpos($src, $test) ) + if ( 0 === strpos( $src, $test ) ) { return true; + } } return false; }