_x( string $text, string $context, string $domain = 'default' ): string
- Since
- 2.8.0
- Source
wp-includes/l10n.php:408
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
$textstring- Text to translate.
$contextstring- Context information for the translators.
$domainstringoptional- Text domain. Unique identifier for retrieving translated strings. Default 'default'.Default:
'default'
Return
string- Translated context string without pipe.
Uses · 1
- translate_with_gettext_context()Retrieves the translation of $text in the context defined in $context.
Used by · 50
- Custom_Background::init()Sets up the hooks for the Custom Background admin page.
- Custom_Image_Header::init()Sets up the hooks for the Custom Header admin page.
- Custom_Image_Header::step_1()Displays first step of custom header image page.
- Featured_Content::customize_register()Add settings to the Customizer.
- Featured_Content::get_setting()Get featured content settings.
- Plugin_Installer_Skin::after()Performs an action following a plugin install.
- Plugin_Installer_Skin::do_overwrite()Checks if the plugin can be overwritten and outputs the HTML for overwriting a plugin on upload.
- Theme_Installer_Skin::after()Performs an action following a single theme install.
- Theme_Installer_Skin::do_overwrite()Checks if the theme can be overwritten and outputs the HTML for overwriting a theme on upload.
- Theme_Upgrader_Skin::after()Performs an action following a single theme update.
- TwentyTwenty_Customize::register()Register customizer options.
- WP_Comments_List_Table::get_bulk_actions()
Show all 50
- WP_Comments_List_Table::get_columns()
- WP_Comments_List_Table::get_sortable_columns()
- WP_Comments_List_Table::handle_row_actions()Generates and displays row actions links.
- WP_Community_Events::format_event_data_time()Adds formatted date and time items for each event in an API response.
- WP_Customize_Manager::customize_pane_settings()Prints JavaScript settings for parent window.
- WP_Customize_Manager::register_controls()Registers some default controls.
- WP_Customize_Nav_Menu_Locations_Control::content_template()JS/Underscore template for the control UI.
- WP_Customize_Nav_Menu_Setting::sanitize()Sanitize an input.
- WP_Customize_Nav_Menus::customize_register()Adds the customizer settings and controls.
- WP_Customize_Nav_Menus::enqueue_scripts()Enqueues scripts and styles for Customizer pane.
- WP_Customize_Nav_Menus::load_available_items_query()Performs the post_type and taxonomy queries for loading available menu items.
- WP_Customize_Nav_Menus::search_available_items_query()Performs post queries for available-item searching.
- WP_Customize_Theme_Control::content_template()Render a JS template for theme display.
- WP_Customize_Widgets::enqueue_scripts()Enqueues scripts and styles for Customizer panel and export data to JavaScript.
- WP_Debug_Data::get_wp_core()Gets the WordPress core section of the debug data.
- WP_Links_List_Table::get_columns()
- WP_Links_List_Table::get_sortable_columns()
- WP_List_Table::pagination()Displays the pagination.
- WP_Locale::get_word_count_type()Retrieves the localized word count type.
- WP_Locale::init()Sets up the translated strings and object properties.
- WP_MS_Sites_List_Table::__construct()Constructor.
- WP_MS_Sites_List_Table::get_bulk_actions()
- WP_MS_Sites_List_Table::get_columns()
- WP_MS_Sites_List_Table::get_sortable_columns()
- WP_MS_Sites_List_Table::handle_row_actions()Generates and displays row action links.
- WP_MS_Themes_List_Table::column_name()Handles the name column output.
- WP_MS_Users_List_Table::column_name()Handles the name column output.
- WP_MS_Users_List_Table::get_bulk_actions()
- WP_MS_Users_List_Table::get_columns()
- WP_MS_Users_List_Table::get_sortable_columns()
- WP_Media_List_Table::_get_row_actions()
- WP_Media_List_Table::get_columns()
- WP_Media_List_Table::get_sortable_columns()
- WP_Media_List_Table::get_views()
- WP_Navigation_Fallback::create_default_fallback()Creates a default Navigation Block Menu fallback.
- WP_Plugin_Dependencies::display_admin_notice_for_circular_dependencies()Displays an admin notice if circular dependencies are installed.
- WP_Plugin_Install_List_Table::display_rows()Generates the list table rows.
- WP_Plugin_Install_List_Table::prepare_items()
Source
function _x( $text, $context, $domain = 'default' ) { return translate_with_gettext_context( $text, $context, $domain );}History
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/l10n.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.