_x( string $text, string $context, string $domain = 'default' )
Retrieves translated string with gettext context.
Description
Quite a few times, there will be collisions with similar translatable text found in more than two places, but with different translated context.
By including the context in the pot file, translators can translate the two strings differently.
Parameters
- $text
-
(Required) Text to translate.
- $context
-
(Required) Context information for the translators.
- $domain
-
(Optional) Text domain. Unique identifier for retrieving translated strings.<br> Default 'default'.
Default value: 'default'
Return
(string) Translated context string without pipe.
Source
File: wp-includes/l10n.php
function _x( $text, $context, $domain = 'default' ) {
return translate_with_gettext_context( $text, $context, $domain );
}
Related
Uses
Uses | Description |
---|---|
wp-includes/l10n.php: translate_with_gettext_context() |
Retrieves the translation of $text in the context defined in $context. |
Used By
Used By | Description |
---|---|
wp-admin/includes/template.php: get_post_states() |
Retrieves an array of post states from a post. |
wp-admin/includes/post.php: taxonomy_meta_box_sanitize_cb_input() |
Sanitizes POST values from an input taxonomy metabox. |
wp-admin/includes/plugin.php: validate_plugin_requirements() |
Validates the plugin requirements for ClassicPress version and PHP version. |
wp-admin/includes/class-plugin-installer-skin.php: Plugin_Installer_Skin::do_overwrite() |
Check if the plugin can be overwritten and output the HTML for overwriting a plugin on upload. |
wp-admin/includes/meta-boxes.php: register_and_do_post_meta_boxes() |
Registers the default post meta boxes, and runs the |
wp-admin/includes/class-theme-installer-skin.php: Theme_Installer_Skin::do_overwrite() |
Check if the theme can be overwritten and output the HTML for overwriting a theme on upload. |
wp-admin/includes/class-wp-debug-data.php: WP_Debug_Data::debug_data() |
Static function for generating site debug data when required. |
wp-includes/class-wp-locale.php: WP_Locale::get_word_count_type() |
Retrieves the localized word count type. |
wp-includes/user.php: wp_list_users() |
Lists all the users of the site, with several options available. |
wp-includes/class-wp-taxonomy.php: WP_Taxonomy::get_default_labels() |
Returns the default labels for taxonomies. |
wp-includes/ms-functions.php: wpmu_new_site_admin_notification() |
Notifies the Multisite network administrator that a new site was created. |
wp-includes/script-loader.php: wp_default_packages_scripts() |
Registers all the WordPress packages scripts that are in the standardized |
wp-includes/widgets/class-wp-widget-media.php: WP_Widget_Media::get_l10n_defaults() |
Returns the default localized strings used by the widget. |
wp-includes/class-wp-post-type.php: WP_Post_Type::get_default_labels() |
Returns the default labels for post types. |
wp-includes/functions.php: wp_get_default_update_php_url() |
Gets the default URL to learn more about updating the PHP version the site is running on. |
wp-includes/theme.php: validate_theme_requirements() |
Validates the theme requirements for WordPress version and PHP version. |
wp-includes/author-template.php: wp_list_authors() |
Lists all the authors of the site, with several options available. |
wp-login.php: login_footer() |
Outputs the footer for the login page. |
wp-includes/customize/class-wp-customize-nav-menu-setting.php: WP_Customize_Nav_Menu_Setting::sanitize() |
Sanitize an input. |
wp-includes/customize/class-wp-customize-nav-menu-locations-control.php: WP_Customize_Nav_Menu_Locations_Control::content_template() |
JS/Underscore template for the control UI. |
wp-includes/customize/class-wp-customize-theme-control.php: WP_Customize_Theme_Control::content_template() |
Render a JS template for theme display. |
wp-includes/general-template.php: register_admin_color_schemes() |
Registers the default admin color schemes. |
wp-includes/general-template.php: feed_links() |
Displays the links to the general feeds. |
wp-includes/general-template.php: feed_links_extra() |
Displays the links to the extra feeds such as category feeds. |
wp-includes/general-template.php: get_the_archive_title() |
Retrieves the archive title based on the queried object. |
wp-includes/general-template.php: get_calendar() |
Displays calendar with days that have posts as links. |
wp-includes/general-template.php: wp_get_document_title() |
Returns document title for the current page. |
wp-includes/general-template.php: get_search_form() |
Displays search form. |
wp-includes/script-loader.php: wp_default_scripts() |
Register all ClassicPress scripts. |
wp-includes/script-loader.php: wp_default_styles() |
Assigns default styles to $styles object. |
wp-includes/widgets/class-wp-widget-media-audio.php: WP_Widget_Media_Audio::__construct() |
Constructor. |
wp-includes/widgets/class-wp-widget-media-video.php: WP_Widget_Media_Video::__construct() |
Constructor. |
wp-includes/widgets/class-wp-widget-recent-comments.php: WP_Widget_Recent_Comments::widget() |
Outputs the content for the current Recent Comments widget instance. |
wp-includes/widgets/class-wp-widget-search.php: WP_Widget_Search::__construct() |
Sets up a new Search widget instance. |
wp-includes/widgets/class-wp-widget-media-gallery.php: WP_Widget_Media_Gallery::__construct() |
Constructor. |
wp-includes/widgets/class-wp-widget-media-image.php: WP_Widget_Media_Image::__construct() |
Constructor. |
wp-includes/widgets/class-wp-widget-meta.php: WP_Widget_Meta::widget() |
Outputs the content for the current Meta widget instance. |
wp-includes/class-wp-customize-widgets.php: WP_Customize_Widgets::enqueue_scripts() |
Enqueues scripts and styles for Customizer panel and export data to JavaScript. |
wp-includes/l10n.php: wp_dropdown_languages() |
Displays or returns a Language selector. |
wp-includes/l10n.php: _ex() |
Displays translated string with gettext context. |
wp-includes/class-wp-query.php: WP_Query::get_search_stopwords() |
Retrieve stopwords used when parsing search terms. |
wp-includes/comment.php: get_comment_statuses() |
Retrieves all of the WordPress supported comment statuses. |
wp-includes/admin-bar.php: wp_admin_bar_new_content_menu() |
Adds “Add New” menu. |
wp-includes/class-wp-locale.php: WP_Locale::init() |
Sets up the translated strings and object properties. |
wp-includes/link-template.php: get_the_posts_pagination() |
Retrieves a paginated navigation to next/previous set of posts, when applicable. |
wp-includes/post-formats.php: get_post_format_strings() |
Returns an array of post format slugs to their translated and pretty display versions |
wp-includes/user.php: wp_dropdown_users() |
Creates dropdown HTML content of users. |
wp-includes/user.php: wp_insert_user() |
Inserts a user into the database. |
wp-includes/class-wp-theme.php: WP_Theme::translate_header() |
Translates a theme header. |
wp-includes/theme.php: get_theme_starter_content() |
Expands a theme’s starter content configuration using core-provided data. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::customize_pane_settings() |
Prints JavaScript settings for parent window. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::register_controls() |
Registers some default controls. |
wp-includes/post-template.php: wp_post_revision_title() |
Retrieves formatted date timestamp of a revision (linked to that revisions’s page). |
wp-includes/post-template.php: wp_post_revision_title_expanded() |
Retrieves formatted date timestamp of a revision (linked to that revisions’s page). |
wp-includes/post-template.php: the_meta() |
Displays a list of post custom fields. |
wp-includes/post.php: wp_set_post_terms() |
Sets the terms for a post. |
wp-includes/post.php: get_post_mime_types() |
Gets default post mime types. |
wp-includes/post.php: _wp_privacy_statuses() |
Returns statuses for privacy requests. |
wp-includes/post.php: create_initial_post_types() |
Creates the initial post types when ‘init’ action is fired. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::customize_register() |
Adds the customizer settings and controls. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::load_available_items_query() |
Performs the post_type and taxonomy queries for loading available menu items. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::search_available_items_query() |
Performs post queries for available-item searching. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::enqueue_scripts() |
Enqueues scripts and styles for Customizer pane. |
wp-includes/ms-functions.php: wpmu_signup_blog_notification() |
Sends a confirmation request email to a user when they sign up for a new site. The new site will not become active until the confirmation link is clicked. |
wp-includes/ms-functions.php: wpmu_signup_user_notification() |
Sends a confirmation request email to a user when they sign up for a new user account (without signing up for a site at the same time). The user account will not become active until the confirmation link is clicked. |
wp-includes/formatting.php: capital_P_dangit() |
Forever eliminate “Wordpress” from the planet (or at least the little bit we can influence). |
wp-includes/formatting.php: wp_trim_excerpt() |
Generates an excerpt from the content, if needed. |
wp-includes/formatting.php: wptexturize() |
Replaces common plain text characters with formatted entities. |
wp-includes/class-wp-editor.php: _WP_Editors::editor() |
Outputs the HTML for a single instance of the editor. |
wp-includes/class-wp-editor.php: _WP_Editors::get_translation() | |
wp-includes/taxonomy.php: create_initial_taxonomies() |
Creates the initial taxonomies. |
wp-includes/comment-template.php: comment_form() |
Outputs a complete commenting form for use within a template. |
wp-includes/comment-template.php: comment_type() |
Displays the comment type of the current comment. |
wp-includes/comment-template.php: get_comments_number_text() |
Displays the language string for the number of comments the current post has. |
wp-includes/comment-template.php: get_comment_excerpt() |
Retrieves the excerpt of the given comment. |
wp-includes/functions.php: wp_maybe_decline_date() |
Determines if the date should be declined. |
wp-includes/functions.php: size_format() |
Converts a number of bytes to the largest unit the bytes will fit into. |
wp-admin/menu.php: _add_themes_utility_last() |
Adds the (theme) ‘Editor’ link to the bottom of the Appearance menu. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::step_1() |
Display first step of custom header image page. |
wp-admin/includes/deprecated.php: wp_dashboard_plugins_output() |
Display plugins text for the ClassicPress news widget. |
wp-admin/includes/class-wp-screen.php: WP_Screen::show_screen_options() | |
wp-admin/includes/class-wp-screen.php: WP_Screen::render_meta_boxes_preferences() |
Renders the meta boxes preferences. |
wp-admin/includes/class-theme-upgrader-skin.php: Theme_Upgrader_Skin::after() |
Action to perform following a single theme update. |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::_get_row_actions() | |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::get_views() | |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::get_columns() | |
wp-admin/includes/class-wp-plugins-list-table.php: WP_Plugins_List_Table::single_row() | |
wp-admin/includes/class-wp-list-table.php: WP_List_Table::pagination() |
Displays the pagination. |
wp-admin/includes/class-wp-ms-themes-list-table.php: WP_MS_Themes_List_Table::column_name() |
Handles the name column output. |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::get_bulk_actions() | |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::get_columns() | |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::handle_row_actions() |
Generates and displays row actions links. |
wp-admin/includes/template.php: list_meta() |
Outputs a post’s public meta data in the Custom Fields meta box. |
wp-admin/includes/network.php: network_step1() |
Prints step 1 for Network installation process. |
wp-admin/includes/schema.php: populate_options() |
Create WordPress options and set the default values. |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::get_columns() | |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::handle_row_actions() |
Generates and displays row action links. |
wp-admin/includes/class-wp-ms-users-list-table.php: WP_MS_Users_List_Table::get_bulk_actions() | |
wp-admin/includes/class-wp-ms-users-list-table.php: WP_MS_Users_List_Table::get_columns() | |
wp-admin/includes/class-wp-ms-users-list-table.php: WP_MS_Users_List_Table::column_name() |
Handles the name column output. |
wp-admin/includes/nav-menu.php: wp_nav_menu_item_post_type_meta_box() |
Displays a meta box for a post type menu item. |
wp-admin/includes/plugin-install.php: install_plugin_information() |
Displays plugin information in dialog box form. |
wp-admin/includes/class-wp-links-list-table.php: WP_Links_List_Table::get_columns() | |
wp-admin/includes/ajax-actions.php: wp_ajax_ajax_tag_search() |
Ajax handler for tag search. |
wp-admin/includes/ajax-actions.php: wp_ajax_autocomplete_user() |
Ajax handler for user autocomplete. |
wp-admin/includes/class-wp-plugin-install-list-table.php: WP_Plugin_Install_List_Table::prepare_items() | |
wp-admin/includes/class-wp-plugin-install-list-table.php: WP_Plugin_Install_List_Table::display_rows() | |
wp-admin/includes/upgrade.php: wp_install_defaults() |
Creates the initial content for a newly-installed site. |
wp-admin/includes/upgrade.php: wp_install_maybe_enable_pretty_permalinks() |
Maybe enable pretty permalinks on installation. |
wp-admin/includes/meta-boxes.php: post_submit_meta_box() |
Displays post submit form fields. |
wp-admin/includes/meta-boxes.php: attachment_submit_meta_box() |
Displays attachment submit form fields. |
wp-admin/includes/meta-boxes.php: post_tags_meta_box() |
Displays post tags form fields. |
wp-admin/includes/class-theme-installer-skin.php: Theme_Installer_Skin::after() |
Action to perform following a single theme install. |
wp-admin/includes/theme.php: get_theme_update_available() |
Retrieves the update link if there is a theme update available. |
wp-admin/includes/theme.php: customize_themes_print_templates() |
Prints JS templates for the theme-browsing UI in the Customizer. |
wp-admin/includes/class-wp-ms-sites-list-table.php: WP_MS_Sites_List_Table::__construct() |
Constructor. |
wp-admin/includes/class-wp-ms-sites-list-table.php: WP_MS_Sites_List_Table::get_bulk_actions() | |
wp-admin/includes/class-wp-ms-sites-list-table.php: WP_MS_Sites_List_Table::get_columns() | |
wp-admin/includes/class-wp-ms-sites-list-table.php: WP_MS_Sites_List_Table::handle_row_actions() |
Generates and displays row action links. |
wp-admin/includes/class-wp-themes-list-table.php: WP_Themes_List_Table::display_rows() | |
wp-admin/includes/privacy-tools.php: wp_privacy_generate_personal_data_export_file() |
Generate the personal data export file. |
wp-admin/includes/post.php: bulk_edit_posts() |
Processes the post data for the bulk editing of posts. |
wp-admin/includes/dashboard.php: wp_dashboard_recent_posts() |
Generates Publishing Soon and Recently Published sections. |
wp-admin/includes/dashboard.php: _wp_dashboard_recent_comments_row() |
Outputs a row for the Recent Comments widget. |
wp-admin/includes/class-wp-theme-install-list-table.php: WP_Theme_Install_List_Table::prepare_items() | |
wp-admin/includes/class-wp-theme-install-list-table.php: WP_Theme_Install_List_Table::single_row() |
Prints a theme from the WordPress.org API. |
wp-admin/includes/class-wp-theme-install-list-table.php: WP_Theme_Install_List_Table::install_theme_info() |
Prints the info for a theme (to be used in the theme installer modal). |
wp-admin/includes/update.php: wp_plugin_update_row() |
Displays update information for a plugin. |
wp-admin/includes/update.php: wp_theme_update_row() |
Displays update information for a theme. |
wp-admin/includes/update.php: wp_print_update_row_templates() |
Prints the JavaScript templates for update and deletion rows in list tables. |
wp-admin/includes/dashboard.php: wp_dashboard_recent_drafts() |
Show recent drafts of the user on the dashboard. |
wp-admin/includes/revision.php: wp_prepare_revisions_for_js() |
Prepare revisions for JavaScript. |
wp-admin/includes/class-wp-users-list-table.php: WP_Users_List_Table::get_columns() |
Get a list of columns for the list table. |
wp-admin/includes/class-wp-users-list-table.php: WP_Users_List_Table::single_row() |
Generate HTML for a single row on the users.php admin panel. |
wp-admin/includes/class-wp-users-list-table.php: WP_Users_List_Table::get_role_list() |
Returns an array of translated user role names for a given user object. |
wp-admin/includes/class-wp-terms-list-table.php: WP_Terms_List_Table::get_columns() | |
wp-admin/includes/class-wp-post-comments-list-table.php: WP_Post_Comments_List_Table::get_column_info() |
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |