_get_page_link filter-hookWP 2.1.0

Filters the permalink for a non-page_on_front page.


add_filter( '_get_page_link', 'wp_kama__get_page_link_filter', 10, 2 );

 * Function for `_get_page_link` filter-hook.
 * @param string $link    The page's permalink.
 * @param int    $post_id The ID of the page.
 * @return string
function wp_kama__get_page_link_filter( $link, $post_id ){

	// filter...
	return $link;
The page's permalink.
The ID of the page.


Since 2.1.0 Introduced.

Where the hook is called

wp-includes/link-template.php 456
return apply_filters( '_get_page_link', $link, $post->ID );

Where the hook is used in WordPress

Usage not found.