excerpt_remove_footnotes

函数
excerpt_remove_footnotes ( $content )
参数
  • (string) $content The content to parse.
    Required:
返回值
  • (string) The parsed and filtered content.
定义位置
相关方法
excerpt_remove_blocks_wp_filter_post_meta_footnoteswp_remove_object_termskses_remove_filterswp_remote_fopen
引入
6.3.0
弃用
-

从内容字符串中解析出脚注标记,并呈现适合摘录的内容。

function excerpt_remove_footnotes( $content ) {
	if ( ! str_contains( $content, 'data-fn=' ) ) {
		return $content;
	}

	return preg_replace(
		'_<sup data-fn="[^"]+" class="[^"]+">s*<a href="[^"]+" id="[^"]+">d+</a>s*</sup>_',
		'',
		$content
	);
}

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-05 15:32:55

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

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

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