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
64                date('H', $unixtime),
65                date('i', $unixtime),
66                date('s', $unixtime),
67                $post->post_name,
68                $post->ID,
69                $category,
70                $author,
71                $post->post_name,
72           );
73           return apply_filters('post_link', get_settings('home') . str_replace($rewritecode, $rewritereplace, $permalink), $post);
74      } else { // if they're not using the fancy permalink option
75           $permalink = get_settings('home') . '/?p=' . $post->ID;
76           return apply_filters('post_link', $permalink, $post);
77      }
78 }
79
80 function get_page_link($id = false) {
81      global $post, $wp_rewrite;
82
83      if (! $id) {
84           $id = $post->ID;
85      }