getFileName() : false; $dir = untrailingslashit( wp_normalize_path( $file ? dirname( $file ) : self::root() . 'wp-includes' ) ); } return $dir; } /** The must-use plugins folder. */ public static function mu() { return untrailingslashit( wp_normalize_path( WPMU_PLUGIN_DIR ) ); } /** The uploads base folder (not created if missing). */ public static function uploads() { return untrailingslashit( wp_normalize_path( wp_upload_dir( null, false )['basedir'] ) ); } /** * Root-relative, forward-slashed form of an absolute path. * * @param string $path * @return string */ public static function relative( $path ) { return str_replace( self::root(), '', wp_normalize_path( (string) $path ) ); } }