mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 03:34:33 +00:00
WP_Scripts->in_default_dir() should use the WPINC constant
Props wojtek.szkutnik See #14157. git-svn-id: https://develop.svn.wordpress.org/trunk@28907 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user