mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
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
This commit is contained in:
parent
0ef5c92164
commit
53968da5e2
@ -219,16 +219,19 @@ class WP_Scripts extends WP_Dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function in_default_dir( $src ) {
|
public function in_default_dir( $src ) {
|
||||||
if ( ! $this->default_dirs )
|
if ( ! $this->default_dirs ) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if ( 0 === strpos( $src, '/wp-includes/js/l10n' ) )
|
if ( 0 === strpos( $src, '/' . WPINC . '/js/l10n' ) ) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ( (array) $this->default_dirs as $test ) {
|
foreach ( (array) $this->default_dirs as $test ) {
|
||||||
if ( 0 === strpos($src, $test) )
|
if ( 0 === strpos( $src, $test ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user