Template Tags/edit post link
Материал из WordPress Wiki
Содержание |
Description
Displays a link to edit the current post, if a user is logged in and allowed to edit the post. It must be within The Loop.
Usage
%%% <?php edit_post_link('link', 'before', 'after'); ?> %%%
Examples
Default Usage
Displays edit post link using defaults.
<?php edit_post_link(); ?>
Display Edit in Paragraph Tag
Displays edit post link, with link text "edit", in a paragraph (<p>) tag.
<?php edit_post_link('edit', '<p>', '</p>'); ?>
Parameters
- link
- (string) The link text. Defaults to 'Edit This'.
- before
- (string) Text to put before the link text. There is no default.
- after
- (string) Text to put after the link text. There is no default.