Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: clean_url

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2651           $good_protocol_url = $url;
2652      } else {
2653           if ( ! is_array( $protocols ) )
2654                $protocols = wp_allowed_protocols();
2655           $good_protocol_url = wp_kses_bad_protocol( $url, $protocols );
2656           if ( strtolower( $good_protocol_url ) != strtolower( $url ) )
2657                return '';
2658      }
2659
2660      return apply_filters('clean_url', $good_protocol_url, $original_url, $_context);
2661 }
2662
2663 /**
2664  * Performs esc_url() for database usage.
2665  *
2666  * @since 2.8.0
2667  * @uses esc_url()
2668  *
2669  * @param string $url The URL to be cleaned.