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 |
---|---|
288 | <?php if ( $cats ) : foreach ( $cats as $c ) : ?> |
289 | <wp:category><wp:category_nicename><?php echo $c->slug; ?></wp:category_nicename><wp:category_parent><?php echo $c->parent ? $cats[$c->parent]->name : ''; ?></wp:category_parent><?php wxr_cat_name($c); ?><?php wxr_category_description($c); ?></wp:category> |
290 | <?php endforeach; endif; ?> |
291 | <?php if ( $tags ) : foreach ( $tags as $t ) : ?> |
292 | <wp:tag><wp:tag_slug><?php echo $t->slug; ?></wp:tag_slug><?php wxr_tag_name($t); ?><?php wxr_tag_description($t); ?></wp:tag> |
293 | <?php endforeach; endif; ?> |
294 | <?php if ( $terms ) : foreach ( $terms as $t ) : ?> |
295 | <wp:term><wp:term_taxonomy><?php echo $t->taxonomy; ?></wp:term_taxonomy><wp:term_slug><?php echo $t->slug; ?></wp:term_slug><wp:term_parent><?php echo $t->parent ? $custom_taxonomies[$t->parent]->name : ''; ?></wp:term_parent><?php wxr_term_name($t); ?><?php wxr_term_description($t); ?></wp:term> |
296 | <?php endforeach; endif; ?> |
297 | <?php do_action('rss2_head'); ?> |
298 | <?php if ($post_ids) { |
299 | global $wp_query; |
300 | $wp_query->in_the_loop = true; // Fake being in the loop. |
301 | // fetch 20 posts at a time rather than loading the entire table into memory |
302 | while ( $next_posts = array_splice($post_ids, 0, 20) ) { |
303 | $where = "WHERE ID IN (".join(',', $next_posts).")"; |
304 | $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); |
305 | foreach ($posts as $post) { |
306 | // Don't export revisions. They bloat the export. |