WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2239 | $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); |
2240 | $url = str_replace( "'", ''', $url ); |
2241 | } |
2242 |
|
2243 | if ( !is_array($protocols) ) |
2244 | $protocols = array ('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn'); |
2245 | if ( wp_kses_bad_protocol( $url, $protocols ) != $url ) |
2246 | return ''; |
2247 |
|
2248 | return apply_filters('clean_url', $url, $original_url, $_context); |
2249 | } |
2250 |
|
2251 | /** |
2252 | * Performs esc_url() for database usage. |
2253 | * |
2254 | * @since 2.8.0 |
2255 | * @uses esc_url() |
2256 | * |
2257 | * @param string $url The URL to be cleaned. |