函数文档

codepress_get_lang()

💡 云策文档标注

概述

codepress_get_lang() 函数用于确定 CodePress 语法高亮使用的语言,但已在 WordPress 3.0.0 版本中被弃用。

关键要点

  • 函数 codepress_get_lang( $filename ) 接受一个必需的字符串参数 $filename。
  • 该函数在 WordPress 3.0.0 版本中被弃用,使用 _deprecated_function() 标记。
  • 函数最初在 WordPress 2.8.0 版本中引入。

注意事项

  • 开发者应避免在新代码中使用此函数,因为它已被弃用,可能在未来版本中移除。
  • 相关函数 _deprecated_function() 位于 wp-includes/functions.php 中,用于标记弃用函数并通知使用情况。

📄 原文内容

Determines the language to use for CodePress syntax highlighting.

Parameters

$filenamestringrequired

Source

function codepress_get_lang( $filename ) {
	_deprecated_function( __FUNCTION__, '3.0.0' );
}

Changelog

Version Description
3.0.0 Deprecated.
2.8.0 Introduced.