WPDev.one
Core Function
View Source on Trac ↗

_get_page_link()

_get_page_link( mixed $post = false, mixed $leavename = false, mixed $sample = false )

Retrieves the page permalink.

Parameters 2 required

Name / Type Description
(int

| WP_Post) $post Optional. Post ID or object. Default uses the global `$post`.

Required
$leavename
bool

Optional. Whether to keep the page name. Default false.

bool

$sample Optional. Whether it should be treated as a sample permalink. Default false.

Required

Return Value

(string)
The page permalink.

Function Information

Since Version
2.1.0
Source File
wp-includes/link-template.php
Advertisement