comment_post_redirect

過濾鉤子
apply_filters( 'comment_post_redirect', $location, $comment )
引數
  • (string) $location The 'redirect_to' URI sent via $_POST.
    Required:
  • (WP_Comment) $comment Comment object.
    Required:
定義位置
相關勾子
comment_edit_redirectcomment_postcomment_on_draftcomment_edit_precomment_closed
相關方法
comment_footer_dieget_comment_to_editcomment_timecomment_textget_post_to_editis_redirect
引入
2.0.5
棄用
-

comment_post_redirect: 這個過濾器允許你修改使用者提交評論後被重定向到的URL。

過濾釋出後要傳送給評論者的位置URI。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$location = apply_filters( 'comment_post_redirect', $location, $comment );
$location = apply_filters( 'comment_post_redirect', $location, $comment );
$location = apply_filters( 'comment_post_redirect', $location, $comment );

常見問題

FAQs
檢視更多 >