includes_url( string $path = '', string $scheme = null )
Retrieves the URL to the includes directory.
Description Description
Parameters Parameters
- $path
-
(string) (Optional) Path relative to the includes URL.
Default value: ''
- $scheme
-
(string) (Optional) Scheme to give the includes URL context. Accepts 'http', 'https', or 'relative'.
Default value: null
Return Return
(string) Includes URL link with optional path appended.
Source Source
File: wp-includes/link-template.php
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 );
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Example