WordPress.org

Make WordPress Core

Ticket #11494: wp-settings.php.2.diff

File wp-settings.php.2.diff, 843 bytes (added by sirzooro, 6 years ago)

PLUGINDIR/MUPLUGINDIR should be relative to ABSPATH

  • wp-settings.php

    old new  
    413413 * @since 2.1.0 
    414414 */ 
    415415if ( !defined('PLUGINDIR') ) 
    416         define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH.  For back compat. 
     416        define( 'PLUGINDIR', substr( WP_PLUGIN_DIR, , strlen( ABSPATH ) ) ); // Relative to ABSPATH.  For back compat. 
    417417 
    418418/** 
    419419 * Allows for the mu-plugins directory to be moved from the default location. 
     
    437437 * @since 2.8.0 
    438438 */ 
    439439if ( !defined( 'MUPLUGINDIR' ) ) 
    440         define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); // Relative to ABSPATH.  For back compat. 
     440        define( 'MUPLUGINDIR', substr( WPMU_PLUGIN_DIR, strlen( ABSPATH ) ) ); // Relative to ABSPATH.  For back compat. 
    441441 
    442442if ( is_dir( WPMU_PLUGIN_DIR ) ) { 
    443443        if ( $dh = opendir( WPMU_PLUGIN_DIR ) ) {