Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: post_link

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
106                $date[5],
107                $post->post_name,
108                $post->ID,
109                $category,
110                $author,
111                $post->post_name,
112           );
113           $permalink = get_option('home') . str_replace($rewritecode, $rewritereplace, $permalink);
114           $permalink = user_trailingslashit($permalink, 'single');
115           return apply_filters('post_link', $permalink, $post);
116      } else { // if they're not using the fancy permalink option
117           $permalink = get_option('home') . '/?p=' . $post->ID;
118           return apply_filters('post_link', $permalink, $post);
119      }
120 }
121
122 // get permalink from post ID
123 function post_permalink($post_id = 0, $deprecated = '') {
124      return get_permalink($post_id);
125 }
126
127 // Respects page_on_front.  Use this one.