page_link filter-hookWP 1.5.0

Filters the permalink for a page.

Usage

add_filter( 'page_link', 'wp_kama_page_link_filter', 10, 3 );

/**
 * Function for `page_link` filter-hook.
 * 
 * @param string $link    The page's permalink.
 * @param int    $post_id The ID of the page.
 * @param bool   $sample  Is it a sample permalink.
 *
 * @return string
 */
function wp_kama_page_link_filter( $link, $post_id, $sample ){

	// filter...
	return $link;
}
$link(string)
The page's permalink.
$post_id(int)
The ID of the page.
$sample(true|false)
Is it a sample permalink.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

get_page_link()
page_link
wp-includes/link-template.php 409
return apply_filters( 'page_link', $link, $post->ID, $sample );

Where the hook is used in WordPress

Usage not found.