391functionget_page_link($post=false,$leavename=false,$sample=false){392$post=get_post($post);393394if('page'===get_option('show_on_front')&&(int)get_option('page_on_front')===$post->ID){395$link=home_url('/');396}else{397$link=_get_page_link($post,$leavename,$sample);398}399400/**401 * Filters the permalink for a page.402 *403 * @since 1.5.0404 *405 * @param string $link The page's permalink.406 * @param int $post_id The ID of the page.407 * @param bool $sample Is it a sample permalink.408 */409returnapply_filters('page_link',$link,$post->ID,$sample);410}
History
Introduced in 1.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/link-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.