Make WordPress Core

Changeset 28977


Ignore:
Timestamp:
07/03/2014 07:41:23 PM (11 years ago)
Author:
DrewAPicture
Message:

Clarify the inline documentation for plugins_url() to reflect that it also works with mu-plugins.

Props ericlewis.
See #28499.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r28976 r28977  
    26272627
    26282628/**
    2629  * Retrieve the url to the plugins directory or to a specific file within that directory.
    2630  * You can hardcode the plugin slug in $path or pass __FILE__ as a second argument to get the correct folder name.
     2629 * Retrieve a URL within the plugins or mu-plugins directory.
     2630 *
     2631 * Defaults to the plugins directory URL if no arguments are supplied.
    26312632 *
    26322633 * @since 2.6.0
    26332634 *
    2634  * @param string $path Optional. Path relative to the plugins url.
    2635  * @param string $plugin Optional. The plugin file that you want to be relative to - i.e. pass in __FILE__
    2636  * @return string Plugins url link with optional path appended.
     2635 * @param  string $path   Optional. Extra path appended to the end of the URL, including
     2636 *                        the relative directory if $plugin is supplied. Default empty.
     2637 * @param  string $plugin Optional. A full path to a file inside a plugin or mu-plugin.
     2638 *                        The URL will be relative to its directory. Default empty.
     2639 *                        Typically this is done by passing `__FILE__` as the argument.
     2640 * @return string Plugins URL link with optional paths appended.
    26372641*/
    2638 function plugins_url($path = '', $plugin = '') {
     2642function plugins_url( $path = '', $plugin = '' ) {
    26392643
    26402644    $path = str_replace( '\\' ,'/', $path ); // sanitize for Win32 installs
Note: See TracChangeset for help on using the changeset viewer.