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.

Related

Шаблон:Tag Link Tags

Шаблон:PHP Function Tag Footer

Реклама

Травы и мед здоровье зажжёт. Подскажем где купить тенториум в Москве, доставка.
Здоровье - это самое главное. Натуральный водная настойка прополиса с доставкой.