bbp_forum_row_actions

bbp_forum_row_actions

bbp_forum_row_actions
Codex Home → bbp_forum_row_actions
Description
The 『bbp_forum_row_actions』 action is used to display content within forum topic rows for functions such as administrative shortcuts.
Where it can be found
Line 453 and 454
/includes/forums/template.php
function bbp_forum_row_actions() {
do_action( 'bbp_forum_row_actions' );
}
Line 48
/templates/default/bbpress/loop-single-forum.php

How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
add_action( 'bbp_forum_row_actions', 'jc_forum_row_actions' );
function jc_forum_row_actions($action) {
$action = edit_post_link( 'Edit forum' );
return $action;
}
This will display a link to edit each forum, if a user is logged in and able to make edits.
Note: Always remember to prefix your functions to avoid conflicts!

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

报告拼写错误

以下文本将发送给我们的编辑: