首页 WordPress函数大全 esc_attr__()

esc_attr__()

2020-05-01 / 4572阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

esc_attr__( string $text, string $domain = 'default' )

Retrieve the translation of $text and escapes it for safe use in an attribute.

描述

If there is no translation, or the text domain isn’t loaded, the original text is returned.

参数

$text

(string)
(Required)
Text to translate.

$domain

(string)
(Optional)
Text domain. Unique identifier for retrieving translated strings.

Default value: 'default'

返回

(string) Translated text on success, original text on failure.

大家谈论
    我的见解