includes_url

The timeline below displays how wordpress function includes_url has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.8

/**
 * Retrieves the URL to the includes directory.
 *
 * @since 2.6.0
 *
 * @param string      $path   Optional. Path relative to the includes URL. Default empty.
 * @param string|null $scheme Optional. Scheme to give the includes URL context. Accepts
 *                            'http', 'https', or 'relative'. Default null.
 * @return string Includes URL link with optional path appended.
 */
function includes_url($path = '', $scheme = null)
{
    $url = site_url('/' . WPINC . '/', $scheme);
    if ($path && is_string($path)) {
        $url .= ltrim($path, '/');
    }
    /**
     * Filters the URL to the includes directory.
     *
     * @since 2.8.0
     * @since 5.8.0 The `$scheme` parameter was added.
     *
     * @param string      $url    The complete URL to the includes directory including scheme and path.
     * @param string      $path   Path relative to the URL to the wp-includes directory. Blank string
     *                            if no path is specified.
     * @param string|null $scheme Scheme to give the includes URL context. Accepts
     *                            'http', 'https', 'relative', or null. Default null.
     */
    return apply_filters('includes_url', $url, $path, $scheme);
}

WordPress Version: 5.7

/**
 * Retrieves the URL to the includes directory.
 *
 * @since 2.6.0
 *
 * @param string      $path   Optional. Path relative to the includes URL. Default empty.
 * @param string|null $scheme Optional. Scheme to give the includes URL context. Accepts
 *                            'http', 'https', or 'relative'. Default null.
 * @return string Includes URL link with optional path appended.
 */
function includes_url($path = '', $scheme = null)
{
    $url = site_url('/' . WPINC . '/', $scheme);
    if ($path && is_string($path)) {
        $url .= ltrim($path, '/');
    }
    /**
     * Filters the URL to the includes directory.
     *
     * @since 2.8.0
     *
     * @param string $url  The complete URL to the includes directory including scheme and path.
     * @param string $path Path relative to the URL to the wp-includes directory. Blank string
     *                     if no path is specified.
     */
    return apply_filters('includes_url', $url, $path);
}

WordPress Version: 4.6

/**
 * Retrieves the URL to the includes directory.
 *
 * @since 2.6.0
 *
 * @param string $path   Optional. Path relative to the includes URL. Default empty.
 * @param string $scheme Optional. Scheme to give the includes URL context. Accepts
 *                       'http', 'https', or 'relative'. Default null.
 * @return string Includes URL link with optional path appended.
 */
function includes_url($path = '', $scheme = null)
{
    $url = site_url('/' . WPINC . '/', $scheme);
    if ($path && is_string($path)) {
        $url .= ltrim($path, '/');
    }
    /**
     * Filters the URL to the includes directory.
     *
     * @since 2.8.0
     *
     * @param string $url  The complete URL to the includes directory including scheme and path.
     * @param string $path Path relative to the URL to the wp-includes directory. Blank string
     *                     if no path is specified.
     */
    return apply_filters('includes_url', $url, $path);
}

WordPress Version: 4.5

/**
 * Retrieve the url to the includes directory.
 *
 * @since 2.6.0
 *
 * @param string $path   Optional. Path relative to the includes url.
 * @param string $scheme Optional. Scheme to give the includes url context.
 * @return string Includes url link with optional path appended.
 */
function includes_url($path = '', $scheme = null)
{
    $url = site_url('/' . WPINC . '/', $scheme);
    if ($path && is_string($path)) {
        $url .= ltrim($path, '/');
    }
    /**
     * Filter the URL to the includes directory.
     *
     * @since 2.8.0
     *
     * @param string $url  The complete URL to the includes directory including scheme and path.
     * @param string $path Path relative to the URL to the wp-includes directory. Blank string
     *                     if no path is specified.
     */
    return apply_filters('includes_url', $url, $path);
}

WordPress Version: 4.3

/**
 * Retrieve the url to the includes directory.
 *
 * @since 2.6.0
 *
 * @param string $path   Optional. Path relative to the includes url.
 * @param string $scheme Optional. Scheme to give the includes url context.
 * @return string Includes url link with optional path appended.
*/
function includes_url($path = '', $scheme = null)
{
    $url = site_url('/' . WPINC . '/', $scheme);
    if ($path && is_string($path)) {
        $url .= ltrim($path, '/');
    }
    /**
     * Filter the URL to the includes directory.
     *
     * @since 2.8.0
     *
     * @param string $url  The complete URL to the includes directory including scheme and path.
     * @param string $path Path relative to the URL to the wp-includes directory. Blank string
     *                     if no path is specified.
     */
    return apply_filters('includes_url', $url, $path);
}

WordPress Version: 3.9

/**
 * Retrieve the url to the includes directory.
 *
 * @since 2.6.0
 *
 * @param string $path Optional. Path relative to the includes url.
 * @param string $scheme Optional. Scheme to give the includes url context.
 * @return string Includes url link with optional path appended.
*/
function includes_url($path = '', $scheme = null)
{
    $url = site_url('/' . WPINC . '/', $scheme);
    if ($path && is_string($path)) {
        $url .= ltrim($path, '/');
    }
    /**
     * Filter the URL to the includes directory.
     *
     * @since 2.8.0
     *
     * @param string $url  The complete URL to the includes directory including scheme and path.
     * @param string $path Path relative to the URL to the wp-includes directory. Blank string
     *                     if no path is specified.
     */
    return apply_filters('includes_url', $url, $path);
}

WordPress Version: 3.7

/**
 * Retrieve the url to the includes directory.
 *
 * @package WordPress
 * @since 2.6.0
 *
 * @param string $path Optional. Path relative to the includes url.
 * @param string $scheme Optional. Scheme to give the includes url context.
 * @return string Includes url link with optional path appended.
*/
function includes_url($path = '', $scheme = null)
{
    $url = site_url('/' . WPINC . '/', $scheme);
    if ($path && is_string($path)) {
        $url .= ltrim($path, '/');
    }
    return apply_filters('includes_url', $url, $path);
}