get_the_permalink()
最后更新于:2021-11-27 02:21:30
get_the_permalink( int|GC_Post$post, bool$leavename=false)Retrieves the full permalink for the current post or post ID.
参数
- $post
-
(int|GC_Post) (Optional) Post ID or post object. Default is the global
$post
. - $leavename
-
(bool) (Optional) Whether to keep post name or page name.
Default value: false
响应
(string|false) The permalink URL or false if post does not exist.
源文件
文件: gc-includes/link-template.php
function get_the_permalink( $post = 0, $leavename = false ) {
return get_permalink( $post, $leavename );
}