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 |
---|---|
23 | } |
24 |
|
25 | // Get the basics. |
26 | $post_content = apply_filters('content_save_pre', $post_content); |
27 | $post_excerpt = apply_filters('excerpt_save_pre', $post_excerpt); |
28 | $post_title = apply_filters('title_save_pre', $post_title); |
29 | $post_category = apply_filters('category_save_pre', $post_category); |
30 | $post_status = apply_filters('status_save_pre', $post_status); |
31 | $post_name = apply_filters('name_save_pre', $post_name); |
32 | $comment_status = apply_filters('comment_status_pre', $comment_status); |
33 | $ping_status = apply_filters('ping_status_pre', $ping_status); |
34 | |
35 | // Make sure we set a valid category |
36 | if (0 == count($post_category) || !is_array($post_category)) { |
37 | $post_category = array(get_option('default_category')); |
38 | } |
39 | $post_cat = $post_category[0]; |
40 |
|
41 | if ( empty($post_author) ) |
Line | Code |
218 | // Export array as variables |
219 | extract($object); |
220 |
|
221 | // Get the basics. |
222 | $post_content = apply_filters('content_save_pre', $post_content); |
223 | $post_excerpt = apply_filters('excerpt_save_pre', $post_excerpt); |
224 | $post_title = apply_filters('title_save_pre', $post_title); |
225 | $post_category = apply_filters('category_save_pre', $post_category); |
226 | $post_name = apply_filters('name_save_pre', $post_name); |
227 | $comment_status = apply_filters('comment_status_pre', $comment_status); |
228 | $ping_status = apply_filters('ping_status_pre', $ping_status); |
229 | $post_mime_type = apply_filters('post_mime_type_pre', $post_mime_type); |
230 |
|
231 | // Make sure we set a valid category |
232 | if (0 == count($post_category) || !is_array($post_category)) { |
233 | $post_category = array(get_option('default_category')); |
234 | } |
235 | $post_cat = $post_category[0]; |
236 |
|