It’s used for translate text.
The second argument is a kind of namespace (called domain here) to retrieve the translation (for example from a dedicated file or something else).
So Anyword
here, should be the guy behind the template, or the company or what ever that can be a domain/namespace.
edit:
The doc from wordpress give more explanation on how to internationalizing a plugin:
Add this to the Plugin code to make sure the language file(s) are loaded:
load_plugin_textdomain('your-unique-name', false, basename( dirname( __FILE__ ) ) . '/languages' );
To fetch a string simply use __('String name','your-unique-name');
to return the translation or _e('String name','your-unique-name');
to echo the translation. Translations will then go into your plugin’s /languages folder.
For your plugin/theme, the your-unique-name
seems to be Anyword
.
Related Posts:
- Is there a way to parse shortcodes in PHP?
- Displaying a WooCommerce product via PHP
- Static Frontpage Pagination – Custom loop
- Get the php template file from other theme folder
- Who’s job is it to load a plugin’s translated strings?
- wp_remote_get returns an error for valid URL
- How to loop over custom fields in a page template?
- Exclude pages with certain template from wp_list_pages
- Use Timber/Twig to pull an image by image ID [closed]
- Categories Template Assistance
- Unable to set right time in admin and frontend template
- Easiest way to show total number of subpages
- Switching between custom templates in a post type of the admin menu
- Use template for posts with a particular category grandparent
- Blank space at beginning of tag?
- Placing the_content inside shortcode not working
- Add a Second Menu to a theme that only support 1 menu
- Custom excerpt function re-factoring
- Inject PHP code into “sidebar-content” – code before my WooCommerce sidebar widget?
- How to display user nickname (not display name) in PHP template?
- Custom Template 404 for specific custom post type
- How to properly insert a link to a template in WordPress?
- Custom field value not saving when it contains a URL?
- Automatically add custom CSS to new posts using a category template
- Render ninja form inside markup
- Using WordPress gettext functions in a library outside plugin or theme scope
- how could I load a different template part by page
- creating a second image attachment template?
- How can I get a single php file that is the equivalent of an existing WordPress page?
- Custom search results page not working with empty search
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- How to show single category archive
- code is skipping a div
- Issues getting PHP to display in category pages
- Secondary navigation menu on one page
- Enable custom logo upload if logo is not in header
- How to Internationalize WordPress – Extract strings with textdomains, per textdomain individually
- How can I edit the content in index.php? [duplicate]
- Woocommerce Show Single Product on Homepage
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Show a different code on front page to other pages
- Does wordpress templates always in files or in database?
- PHP include is only working in certain places in my custom WP theme
- Adding wrapper elements in the_date() like in the_title()?
- How to get all author posts outside of author templates
- Create a Blog Template Page
- Showing latest post without 301 redirect
- Is there a way to hook or call a custom woocomerce template that is not part of the default templates of woocommerce?
- How to call multiple functions from multiple files into a WordPress page template [closed]
- How do I define a lookup table that will work across all PHP elements of the template?
- persist a variable set in header.php all the way down to footer.php
- Why does the Woocommerce grouped template prints the unpublished products?
- Decimal values via get_option() with custom local (decimal point = comma)
- Advice on creating a WP Archive Template with Custom Taxonomy (get_term_meta)
- add_filter function concatenate string and locate_template function
- How to render a block from php template
- Override Admin menu icon
- How to suppress template-parts in undescores?
- Need help with pagination
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Creating custom page template from existing PHP site
- How do I query a single data value from the wp_metadata table?
- Conditional string comparison failing for basename/slug
- Splitting the_content() by size?
- How to add new CSS file to new PHP file
- php loading different structure than source code
- Prevent Company Name From Translating
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- Loading Elementor templates in a Bootstrap modal on button clicking
- How to find which .mo file is responsible for displaying a particular localized string?
- Integrate admin plugin into template. Very interesant (live search + autocomplete with wp rest api, in vanilla js)
- Require()/Include() post template adding extra content
- Display articles with a different template in the home page | Solved |
- What are the advantages/disadvantages of ways to use php template files?
- Change the “Show All” button in a WordPress Portfolio Filter
- Check if current post in loop is last on current page
- Converting Array to String Issue [closed]
- ACF – Custom image for Product Tags not displaying
- Polylang and template files
- Roots Sage Symfony error when using override from template
- How to create dynamic templates?
- Change WooCommerce template for PDF – access to custom field
- How to display last whole post on the homepage
- What syntax is this? “{{post.price}}”
- How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?
- Add point on excerpt post
- WooCommerce – Print Processing orders [closed]
- Loop returns more items than exist?
- Access methods in plugin template
- Create dynamic content from one WP page to multiple other pages
- Problems With Query and/or Template Part and/or PHP
- why is this content-template not showing any of my blog-entries?
- PHP code rendered in HTML
- Odd page behaviour after removing sidebar
- get_permalink returning first letter
- Custom Archive Page
- How to refresh a template page on WordPress in 3 seconds – easiest method?
- php “use” not working in template [closed]
- Twig+WordPress how to use array arguments inside a function?
- How to implement a custom sliding banner? [closed]