^ 回到顶部
  • 人生没有定律,每个人都有自己的节奏
  • 本站wordpress建站教程均通过实践后发布,希望对你有帮助
  • 希望你的坚持,都是因为热爱,而不是因为不甘心
  • 8年wordpress建站经验,5星服务品质
  • 那些不愿意让你吃亏的人,才是真正值得你深交的人,也是值得你付出时间的人
  • 阿里云2核2g仅需86元/年

wordpress函数esc_attr__()用法示例

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.

新用户2核2g仅需86元/年    领取1153套模板    免费cdn流量包    ¥3188礼包


参数

$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.


源代码

File: wp-includes/l10n.php

function esc_attr__( $text, $domain = 'default' ) {
	return esc_attr( translate( $text, $domain ) );
}

更新日志

Version 描述
2.8.0 Introduced.

相关函数

Uses

  • wp-includes/l10n.php:
    translate()
  • wp-includes/formatting.php:
    esc_attr()

Used By

  • wp-includes/class-wp-customize-nav-menus.php:
    WP_Customize_Nav_Menus::enqueue_scripts()
  • wp-admin/includes/class-wp-comments-list-table.php:
    WP_Comments_List_Table::handle_row_actions()
  • wp-admin/includes/class-wp-screen.php:
    WP_Screen::render_screen_options()
  • wp-admin/includes/class-plugin-upgrader-skin.php:
    Plugin_Upgrader_Skin::after()
  • wp-admin/includes/class-wp-theme-install-list-table.php:
    WP_Theme_Install_List_Table::install_theme_info()
  • wp-admin/includes/class-wp-theme-install-list-table.php:
    WP_Theme_Install_List_Table::single_row()
  • wp-admin/includes/update.php:
    update_nag()
  • wp-admin/includes/dashboard.php:
    wp_dashboard_browser_nag()
  • wp-admin/includes/dashboard.php:
    _wp_dashboard_recent_comments_row()
  • wp-admin/includes/media.php:
    wp_media_insert_url_form()
  • wp-admin/includes/media.php:
    edit_form_image_editor()
  • wp-admin/includes/media.php:
    get_media_item()
  • wp-admin/includes/class-wp-media-list-table.php:
    WP_Media_List_Table::get_columns()
  • wp-admin/includes/class-wp-comments-list-table.php:
    WP_Comments_List_Table::extra_tablenav()
  • wp-admin/includes/nav-menu.php:
    wp_nav_menu_item_post_type_meta_box()
  • wp-admin/includes/nav-menu.php:
    wp_nav_menu_item_taxonomy_meta_box()
  • wp-admin/includes/class-wp-posts-list-table.php:
    WP_Posts_List_Table::get_columns()
  • wp-admin/menu-header.php:
    _wp_menu_output()
  • wp-includes/functions.php:
    wp_timezone_choice()
  • wp-includes/widgets/class-wp-widget-meta.php:
    WP_Widget_Meta::widget()
  • wp-includes/class-wp-customize-widgets.php:
    WP_Customize_Widgets::enqueue_scripts()
  • wp-includes/script-loader.php:
    wp_default_scripts()
  • Show 17 more used by
    Hide more used by


让小雨知道,这篇文章帮到了你
扫码关注微信公众号zs40086(微搜片)随时随地微信看片,抢先福利电影等你来

热门推荐

如有疑问,请前往问答中心反馈!

反馈