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 |
|---|---|
| 958 | $feed = get_query_var('feed'); |
| 959 | |
| 960 | // Remove the pad, if present. |
| 961 | $feed = preg_replace('/^_+/', '', $feed); |
| 962 | |
| 963 | if ( $feed == '' || $feed == 'feed' ) |
| 964 | $feed = 'rss2'; |
| 965 | |
| 966 | $hook = 'do_feed_' . $feed; |
| 967 | do_action($hook, $wp_query->is_comment_feed); |
| 968 | } |
| 969 | |
| 970 | function do_feed_rdf() { |
| 971 | load_template(ABSPATH . WPINC . '/feed-rdf.php'); |
| 972 | } |
| 973 | |
| 974 | function do_feed_rss() { |
| 975 | load_template(ABSPATH . WPINC . '/feed-rss.php'); |
| 976 | } |