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 |
---|---|
121 | $content = addslashes(trim($content)); |
122 |
|
123 |
|
124 | $sql = "INSERT INTO $tableposts (post_author, post_date, post_date_gmt, post_content, post_title, post_modified, post_modified_gmt) VALUES (1, '$post_date', '$post_date_gmt', '$content', '$post_title', '$post_date', '$post_date_gmt')"; |
125 |
|
126 | $result = $wpdb->query($sql); |
127 | $post_ID = $wpdb->insert_id; |
128 |
|
129 | do_action('publish_post', $post_ID); |
130 | do_action('publish_phone', $post_ID); |
131 | pingback($content, $post_ID); |
132 |
|
133 | echo "\n<p><b>Posted title:</b> $post_title<br />"; |
134 | echo "\n<b>Posted content:</b><br /><pre>".$content.'</pre></p>'; |
135 |
|
136 | if (!$post_categories) $post_categories[] = 1; |
137 | foreach ($post_categories as $post_category) : |
138 | $post_category = intval($post_category); |
139 |
|