We have two main functions for translations, _e()
and __()
. The first prints the value, and the second assigns the value.
As we are feeding a value to a function, we don’t print or echo
(the e
in the function) anything, so we use the assignment function __()
.
What happens is that edit_post_link
will receive the translated string for 'Edit'
.
As for the function, edit_post_link($link, $before, $after)
, we could do something like:
edit_post_link( 'Edit this', '<strong>', '</strong>' );
And it would make the edit link with a custom, untranslatable, string in bold. To learn more you can dig in the archives of this site.
Related Posts:
- Upload Multiple Files With media_handle_upload
- Adding a second email address to a completed order in WooCommerce [closed]
- Add custom template page programmatically
- What is the difference between get_page_link and get_permalink functions?
- Possible to search by author name with default WordPress search function?
- Woocommerce add to simple product attribute programmatically [closed]
- Breadcrumbs showing Parent and Child Pages
- Influence of WordPress functions on site speed
- Is it possible to override this function/class in a child theme?
- mysql custom wp query
- TinyMCE custom stylesheets for different post types
- When new user register then add new user role
- Order get_users() by last login date. Is it possible?
- Display random text from a file with the WP built-in AJAX API
- Remove bulk actions based on user role or capabilities
- Set first oembed in post to a global variable or function
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- wp_delete_attachment
- Function to Download External Images to My Site
- WordPress registration and contact form 7 [closed]
- How to call a function on particular page like ‘contact-us’ from function.php of child theme
- Detect Safari desktop browser and include the detection in a shortcode
- Is It wrong to use oop approach on functions.php?
- How to preserve edits to Name or Slug of term when using wp_update_term on save?
- Woocommerce checkout field maxlength, make input number field only (postcode)
- My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)
- PHP files included in functions.php don’t seem to work
- How Can I Expand the WordPress Customize window without any Plugin?
- Register and enqueue style.css custom theme
- Where do I add html code to the menu div?
- Add function to every post?
- WordPress shortcode attributes for database SELECT?
- How to get membership level for specific user email
- Understanding and altering the structure of posted images
- What do the schemes login, login_post, admin, and relative mean?
- Backstretch.js and thumbnail sizes to reduce loading time
- Allow Post Author to be 0 on Update
- How do I hide or remove ‘Category’ from wordpress breadcrumbs
- Trouble with adding a wp_enqueue_script on wordpress
- Display images that are not in the content
- How do display most popular post from a year earlier to the day?
- Updating Media Published Date When Parent Post Is Modified in WordPress
- Display ‘BuddyPress Follow’ follow button to non-logged in users [closed]
- Pagination in relation to archive.php
- Creating A New Admin Menu Tab For Theme Options
- Incorrect redirect after commenting
- Run wp_kses_decode_entities on atom feed?
- Get ID of first image attached to a post
- jQuery does not work
- Function naming convention
- debugging errors.. how to remedy?
- Where do i create my own function in wp-admin
- Pass variable from action back to template
- Function extending with if query in functions.php
- Question about “wp_deregister_script()”
- Turn get_posts as string into an array for use in theme admin options
- Output loop to function return?
- Combine embed_oembed_html and oembed_result
- Load JS file only in specific template
- Why get_user_by() doesn’t work in my code?
- Can’t switch to a child theme using filters template, option_template and option_stylesheet
- What is wrong with code added to functions.php to selectively show styles based on login state
- How to change value of variable in theme file with functions.php WordPress?
- Changing where my author box is printed
- video.js not enqueueing?
- Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]
- functions.php return custom text
- WordPress Categories: Function using custom SQL to return array of specific category IDs
- Override a Post’s URL with Advanced Custom Fields Function
- Change category display name function
- Writing a function for WP Cron to run a SQL command daily
- Wildcard 301 Redirect Using Theme Function
- Changing the default view of “The Events Calendar” for mobile
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- Link to an externally created photo albums
- Hide empty custom field
- add product thumbnail to checkout page only and include variation name
- Lost Your password Hook Not Showing Up
- Function/way to redirect to specific page whenever a specific text occurs on homepage?
- How to identify author in wordpress comments?
- Which method is more correct for removing WooCommerce Extensions menu item?
- Why does Featured Images not load in the backed?
- Help! Need a different logo on my main page from my other pages
- RSS feed including post updates
- Get child-pages slugs of current page into js-file
- Frontend Feature image upload not work
- Automatic add space if user enters number(any digit)
- WordPress not showing pagination links
- Automatically add tag if a checkbox is checked
- How to add a meta information to the URL?
- Adding stick post button to edit post page
- A blank page is shown after I add a Function
- using enqueue_script in a shortcode isn’t working
- How to display milliseconds instead of seconds using timer_stop function? [closed]
- Filter to strip unnecessary attributes
- Will my WordPress site become vulnerable after adding this functions which allows more HTML tags for subscribers?
- get_post_class() not working well
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Add functionality to block comment authors in the Comment edit pag
- WordPress enque the same script causes the setInterval not to work