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 |
---|---|
1054 | '♥' => '♥', |
1055 | '♦' => '♦' |
1056 | ); |
1057 |
|
1058 | return str_replace( array_keys($to_ncr), array_values($to_ncr), $text ); |
1059 | } |
1060 |
|
1061 | function wp_richedit_pre($text) { |
1062 | // Filtering a blank results in an annoying <br />\n |
1063 | if ( empty($text) ) return apply_filters('richedit_pre', ''); |
1064 |
|
1065 | $output = $text; |
1066 | $output = convert_chars($output); |
1067 | $output = wpautop($output); |
1068 |
|
1069 | // These must be double-escaped or planets will collide. |
1070 | $output = str_replace('<', '&lt;', $output); |
1071 | $output = str_replace('>', '&gt;', $output); |
1072 |
|
1073 | return apply_filters('richedit_pre', $output); |
1074 | } |
1075 |
|
1076 | function clean_url( $url, $protocols = null ) { |
1077 | if ('' == $url) return $url; |
1078 | $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%]|i', '', $url); |
1079 | $strip = array('%0d', '%0a'); |
1080 | $url = str_replace($strip, '', $url); |
1081 | $url = str_replace(';//', '://', $url); |
1082 | // Append http unless a relative link starting with / or a php file. |