wp_kses_stripslashes

函式
wp_kses_stripslashes ( $string )
引數
  • (string) $string String to strip slashes from.
    Required:
返回值
  • (string) Fixed string with quoted slashes.
定義位置
相關方法
wp_kses_attr_parsewp_kses_js_entitieswp_kses_splitstripslashes_deepwp_kses_post
引入
1.0.0
棄用
-

wp_kses_stripslashes: 該函式刪除由PHP的magic_quotes_gpc功能新增到字串中的任何斜線,該功能現在已被棄用。

從引號前面刪除斜線。

這個函式將字元序列`””`改為只有`””`。它保留所有其他斜線。`preg_replace(//e)`中的引號需要這個。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_kses_stripslashes( $string ) {
return preg_replace( '%\\"%', '"', $string );
}
function wp_kses_stripslashes( $string ) { return preg_replace( '%\\"%', '"', $string ); }
function wp_kses_stripslashes( $string ) {
	return preg_replace( '%\\"%', '"', $string );
}

常見問題

FAQs
檢視更多 >