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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
1026 | '♥' => '♥', |
1027 | '♦' => '♦' |
1028 | ); |
1029 |
|
1030 | return str_replace( array_keys($to_ncr), array_values($to_ncr), $text ); |
1031 | } |
1032 |
|
1033 | function wp_richedit_pre($text) { |
1034 | // Filtering a blank results in an annoying <br />\n |
1035 | if ( empty($text) ) return apply_filters('richedit_pre', ''); |
1036 |
|
1037 | $output = $text; |
1038 | $output = convert_chars($output); |
1039 | $output = wpautop($output); |
1040 |
|
1041 | // These must be double-escaped or planets will collide. |
1042 | $output = str_replace('<', '&lt;', $output); |
1043 | $output = str_replace('>', '&gt;', $output); |
1044 |
|
1045 | return apply_filters('richedit_pre', $output); |
1046 | } |
1047 |
|
1048 | function clean_url( $url, $protocols = null ) { |
1049 | if ('' == $url) return $url; |
1050 | $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%]|i', '', $url); |
1051 | $strip = array('%0d', '%0a'); |
1052 | $url = str_replace($strip, '', $url); |
1053 | $url = str_replace(';//', '://', $url); |
1054 | // Append http unless a relative link starting with / or a php file. |