remove_permastruct

函式
remove_permastruct ( $name )
引數
  • (string) $name Name for permalink structure.
    Required:
相關
  • WP_Rewrite::remove_permastruct()
定義位置
相關方法
add_permastructremove_query_argremove_actionremove_accentsremove_shortcode
引入
4.5.0
棄用
-

remove_permastruct: 這個函式用來刪除WordPress中的一個固定結構。固定連結結構是用來定製WordPress網站的URL的: 這個函式需要一個引數,即要刪除的固定結構的名稱。

刪除一個永久結構。

只能用於刪除使用add_permastruct()新增的permastructs。內建的permastructs不能被刪除。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function remove_permastruct( $name ) {
global $wp_rewrite;
$wp_rewrite->remove_permastruct( $name );
}
function remove_permastruct( $name ) { global $wp_rewrite; $wp_rewrite->remove_permastruct( $name ); }
function remove_permastruct( $name ) {
	global $wp_rewrite;

	$wp_rewrite->remove_permastruct( $name );
}

常見問題

FAQs
檢視更多 >