WordPress.org

Make WordPress Core

Ticket #33963: 33963.2.patch

File 33963.2.patch, 858 bytes (added by sebastian.pisula, 5 years ago)

Refresh path

  • wp-includes/link-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    31573157}
    31583158
    31593159/**
     3160 * Retrieve the url to the uploads directory.
     3161 *
     3162 * @since 4.5.0
     3163 *
     3164 * @param bool|false $subdir
     3165 *
     3166 * @return string
     3167 */
     3168function upload_url( $subdir = false ) {
     3169        $upload_dir = wp_upload_dir();
     3170
     3171        if ( $subdir ) {
     3172                $upload_dir['baseurl'] .= $upload_dir['subdir'];
     3173        }
     3174
     3175        return $upload_dir['baseurl'];
     3176}
     3177
     3178/**
    31603179 * Retrieve a URL within the plugins or mu-plugins directory.
    31613180 *
    31623181 * Defaults to the plugins directory URL if no arguments are supplied.