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 |
---|---|
95 | $date[5], |
96 | $post->post_name, |
97 | $post->ID, |
98 | $category, |
99 | $author, |
100 | $post->post_name, |
101 | ); |
102 | $permalink = get_option('home') . str_replace($rewritecode, $rewritereplace, $permalink); |
103 | $permalink = user_trailingslashit($permalink, 'single'); |
104 | return apply_filters('post_link', $permalink, $post); |
105 | } else { // if they're not using the fancy permalink option |
106 | $permalink = get_option('home') . '/?p=' . $post->ID; |
107 | return apply_filters('post_link', $permalink, $post); |
108 | } |
109 | } |
110 |
|
111 | // get permalink from post ID |
112 | function post_permalink($post_id = 0, $deprecated = '') { |
113 | return get_permalink($post_id); |
114 | } |
115 |
|
116 | // Respects page_on_front. Use this one. |