Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



includes_url ›

Seit2.6.0
Veraltetn/v
includes_url ( $path = '', $scheme = null )
Parameter: (2)
  • (string) $path Optional. Path relative to the includes URL. Default empty.
    Erforderlich: Nein
    Standard: (leer)
  • (string) $scheme Optional. Scheme to give the includes URL context. Accepts 'http', 'https', or 'relative'. Default null.
    Erforderlich: Nein
    Standard: null
Gibt zurück:
  • (string) Includes URL link with optional path appended.
Definiert in:
Codex:

Retrieves the URL to the includes directory.



Quellcode

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 );
}