函数文档

_preview_theme_stylesheet_filter()

💡 云策文档标注

概述

_preview_theme_stylesheet_filter() 是一个私有函数,用于在预览主题时修改当前样式表。该函数已在 WordPress 4.3.0 版本中被弃用。

关键要点

  • 这是一个私有函数,主要用于主题预览场景。
  • 函数返回类型为字符串。
  • 自 WordPress 4.3.0 起,该函数已被弃用,调用时会触发 _deprecated_function() 并返回空字符串。
  • 函数最初在 WordPress 2.9.0 版本中引入。

代码示例

_preview_theme_stylesheet_filter() {
    _deprecated_function( __FUNCTION__, '4.3.0' );
    return '';
}

注意事项

开发者应避免使用此函数,因为它已被弃用,建议查找替代方案或更新代码以兼容新版本。


📄 原文内容

Private function to modify the current stylesheet when previewing a theme

Return

string

Source

function _preview_theme_stylesheet_filter() {
	_deprecated_function( __FUNCTION__, '4.3.0' );
	return '';
}

Changelog

Version Description
4.3.0 Deprecated.
2.9.0 Introduced.