redirect_term_location

過濾鉤子
apply_filters( 'redirect_term_location', $location, $tax )
引數
  • (string) $location The destination URL.
    Required:
  • (WP_Taxonomy) $tax The taxonomy object.
    Required:
定義位置
相關勾子
redirect_post_locationedit_term_linkedit_term_taxonomyget_edit_term_linkredirect_canonical
相關方法
wp_redirect_admin_locationsedit_term_linkredirect_canonicalget_edit_term_linkredirect_postget_term_link
引入
4.6.0
棄用
-

redirect_term_location 是一個當WordPress網站重定向一個術語位置時觸發的動作。這個鉤子通常被外掛或主題開發者用來修改術語重定向的行為。

過濾分類法的重定向目標URL。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );
wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );
wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );

常見問題

FAQs
檢視更多 >