wp_credits_section_title

函数
wp_credits_section_title ( $group_data = array() )
参数
  • (array) $group_data The current contributor group.
    Required:
    Default: array()
定义位置
相关方法
wp_credits_section_listwp_post_revision_titlewp_get_session_tokenwp_get_document_titlewp_registration_url
引入
5.3.0
弃用
-

wp_credits_section_title: 这是一个过滤钩子,允许你修改WordPress仪表盘上的功劳部分的标题。功劳部分通常在仪表盘的右下角,显示帮助建立当前版本的WordPress的贡献者。

显示一个给定的贡献者群体的标题。

function wp_credits_section_title( $group_data = array() ) {
	if ( ! count( $group_data ) ) {
		return;
	}

	if ( $group_data['name'] ) {
		if ( 'Translators' === $group_data['name'] ) {
			// Considered a special slug in the API response. (Also, will never be returned for en_US.)
			$title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
		} elseif ( isset( $group_data['placeholders'] ) ) {
			// phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
			$title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] );
		} else {
			// phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
			$title = translate( $group_data['name'] );
		}

		echo '<h2 class="wp-people-group-title">' . esc_html( $title ) . "</h2>n";
	}
}

常见问题

FAQs
查看更多 >
闪电伯伯

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

2025-11-19 09:27:50

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

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

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