permalink_structure_changed

動作鉤子
do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure )
引數
  • (string) $old_permalink_structure The previous permalink structure.
    Required:
  • (string) $permalink_structure The new permalink structure.
    Required:
定義位置
相關勾子
available_permalink_structure_tagswp_image_editor_before_changethe_permalink_rsswp_mail_succeeded
相關方法
permalink_single_rsspermalink_anchorpermalink_linkadd_permastructwp_cache_set_terms_last_changed_wp_sidebars_changed
引入
2.8.0
棄用
-

permalink_structure_changed – 當WordPress管理面板中的固定結構被改變時,該動作被觸發。這個動作可以用來觸發其他動作或程序,如更新.htaccess檔案或重新整理重寫規則。

更新固定連結結構後觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure );
do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure );
do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure );

常見問題

FAQs
檢視更多 >