Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: post_type_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

Line Code
361       * Filters the permalink for a post of a custom post type.
362       *
363       * @since 3.0.0
364       *
365       * @param string  $post_link The post's permalink.
366       * @param WP_Post $post      The post in question.
367       * @param bool    $leavename Whether to keep the post name.
368       * @param bool    $sample    Is it a sample permalink.
369       */
370      return apply_filters( 'post_type_link', $post_link, $post, $leavename, $sample );
371 }
372
373 /**
374  * Retrieves the permalink for the current page or page ID.
375  *
376  * Respects page_on_front. Use this one.
377  *
378  * @since 1.5.0
379  *