edit_post_link()

WordPress模板函数edit_post_link用于输出编辑文章的链接,必须用在The Loop主循环中。

edit_post_link( string $text = null, string $before = '', string $after = '', integer $id = 0, string $class = 'post-edit-link' )

函数参数

$text

字符串值,默认为空

链接的锚文本

$before

字符串值,默认为空

在链接前输出的文本

$after

字符串值,默认为空

在链接后输出的文本

$id

整数型,默认值:0

指定文章ID,输出该文章的编辑链接。

$class

字符串值,默认值:post-edit-link

链接的类名

函数使用示例

<?php edit_post_link('编辑', '<p>', '</p>'); ?>

扩展阅读

edit_post_link()函数位于:wp-includes/link-template.php

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索