Make WordPress Core

Ticket #39414: 39414.patch

File 39414.patch, 989 bytes (added by sebastian.pisula, 8 years ago)
  • wp-includes/plugin.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    704704 * Get the filesystem directory path (with trailing slash) for the plugin __FILE__ passed in.
    705705 *
    706706 * @since 2.8.0
     707 * @since 4.8.0 Introduced 'path' parameter.
    707708 *
    708709 * @param string $file The filename of the plugin (__FILE__).
     710 * @param string $path Optional. File to return the path for in the plugin directory.
    709711 * @return string the filesystem path of the directory that contains the plugin.
    710712 */
    711 function plugin_dir_path( $file ) {
    712         return trailingslashit( dirname( $file ) );
     713function plugin_dir_path( $file, $path = '' ) {
     714    $path = ltrim( $path, '/' );
     715
     716    return trailingslashit( dirname($file) ) . $path;
    713717}
    714718
    715719/**