函数原型
post_permalink( int|WP_Post $post ): string|false
函数描述
Retrieve permalink from post ID.
是否弃用
Warning: This function has been deprecated. Use get_permalink() instead.
函数参数
-
$post
int|WP_Post
Optional - Post ID or WP_Post object. Default is global $post.
函数返回值
string|false
函数位置
File: wp-includes/deprecated.php.
函数源码
function post_permalink( $post = 0 ) {
_deprecated_function( __FUNCTION__, '4.4.0', 'get_permalink()' );
return get_permalink( $post );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.4.0 | Use get_permalink() |
| 1.0.0 | Introduced. |

