set_url_scheme
Filter HookDescription
Filters the resulting URL after setting the scheme.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3956 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$url
|
The complete URL including scheme and path. |
string
|
$scheme
|
Scheme applied to the URL. One of 'http', 'https', or 'relative'. |
string|null
|
$orig_scheme
|
Scheme requested for the URL. One of 'http', 'https', 'login', 'login_post', 'admin', 'relative', 'rest', 'rpc', or null. |
Usage Examples
Basic Usage
<?php
// Hook into set_url_scheme
add_filter('set_url_scheme', 'my_custom_filter', 10, 3);
function my_custom_filter($url, $scheme, $orig_scheme) {
// Your custom filtering logic here
return $url;
}
Source Code Context
wp-includes/link-template.php:3956
- How this hook is used in WordPress core
<?php
3951 * @param string $url The complete URL including scheme and path.
3952 * @param string $scheme Scheme applied to the URL. One of 'http', 'https', or 'relative'.
3953 * @param string|null $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login',
3954 * 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.
3955 */
3956 return apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme );
3957 }
3958
3959 /**
3960 * Retrieves the URL to the user's dashboard.
3961 *
PHP Documentation
<?php
/**
* Filters the resulting URL after setting the scheme.
*
* @since 3.4.0
*
* @param string $url The complete URL including scheme and path.
* @param string $scheme Scheme applied to the URL. One of 'http', 'https', or 'relative'.
* @param string|null $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login',
* 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.