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
71                $date[3],
72                $date[4],
73                $date[5],
74                $post->post_name,
75                $post->ID,
76                $category,
77                $author,
78                $post->post_name,
79           );
80           return apply_filters('post_link', get_option('home') . str_replace($rewritecode, $rewritereplace, $permalink), $post);
81      } else { // if they're not using the fancy permalink option
82           $permalink = get_option('home') . '/?p=' . $post->ID;
83           return apply_filters('post_link', $permalink, $post);
84      }
85 }
86
87 // get permalink from post ID
88 function post_permalink($post_id = 0, $mode = '') { // $mode legacy
89      return get_permalink($post_id);
90 }
91
92 // Respects page_on_front.  Use this one.