WordPress.org

Make WordPress Core

Changeset 28907


Ignore:
Timestamp:
06/29/2014 10:22:16 PM (7 years ago)
Author:
wonderboymusic
Message:

WP_Scripts->in_default_dir() should use the WPINC constant

Props wojtek.szkutnik
See #14157.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class.wp-scripts.php

    r28518 r28907  
    219219    }
    220220
    221     public function in_default_dir($src) {
    222         if ( ! $this->default_dirs )
     221    public function in_default_dir( $src ) {
     222        if ( ! $this->default_dirs ) {
    223223            return true;
    224 
    225         if ( 0 === strpos( $src, '/wp-includes/js/l10n' ) )
     224        }
     225
     226        if ( 0 === strpos( $src, '/' . WPINC . '/js/l10n' ) ) {
    226227            return false;
     228        }
    227229
    228230        foreach ( (array) $this->default_dirs as $test ) {
    229             if ( 0 === strpos($src, $test) )
     231            if ( 0 === strpos( $src, $test ) ) {
    230232                return true;
     233            }
    231234        }
    232235        return false;
Note: See TracChangeset for help on using the changeset viewer.