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 |
---|---|
146 | $date[5], |
147 | $post->post_name, |
148 | $post->ID, |
149 | $category, |
150 | $author, |
151 | $post->post_name, |
152 | ); |
153 | $permalink = get_option('home') . str_replace($rewritecode, $rewritereplace, $permalink); |
154 | $permalink = user_trailingslashit($permalink, 'single'); |
155 | return apply_filters('post_link', $permalink, $post, $leavename); |
156 | } else { // if they're not using the fancy permalink option |
157 | $permalink = trailingslashit(get_option('home')) . '?p=' . $post->ID; |
158 | return apply_filters('post_link', $permalink, $post, $leavename); |
159 | } |
160 | } |
161 |
|
162 | /** |
163 | * Retrieve permalink from post ID. |
164 | * |
165 | * @since 1.0.0 |
166 | * |
167 | * @param int $post_id Optional. Post ID. |