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