_autop_newline_preservation_helper

函数
_autop_newline_preservation_helper ( $matches )
Access
Private
参数
  • (array) $matches preg_replace_callback matches array
    Required:
返回值
  • (string)
定义位置
相关方法
__checked_selected_helperwp_embed_register_handlerwpmu_log_new_registrations
引入
3.1.0
弃用
-

_autop_newline_preservation_helper: 这个函数被WordPress用来保留通过autop函数的文本中的换行。autop函数会自动给文本添加段落标签,但这个函数确保换行符也被保留下来。

换行保存wpautop()的帮助函数。

function _autop_newline_preservation_helper( $matches ) {
	return str_replace( "n", '<WPPreserveNewline />', $matches[0] );
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-07 07:33:37

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: