首页 WordPress函数大全 get_edit_post_link()

get_edit_post_link()

2020-05-01 / 3507阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_edit_post_link( int|WP_Post $id, string $context = 'display' )

Retrieves the edit post link for post.

描述

Can be used within the WordPress loop or outside of it. Can be used with pages, posts, attachments, and revisions.

参数

$id

(int|WP_Post)
(Optional)
Post ID or post object. Default is the global $post.

$context

(string)
(Optional)
How to output the '&' character. Default '&'.

Default value: 'display'

返回

(string|null) The edit post link for the given post. null if the post type is invalid or does not allow an editing UI.

大家谈论
    我的见解