最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - How to add links in .po (language) file in wordpress?

programmeradmin0浏览0评论

I am beginner in wordpress and I want to know how can I add links in .po file.

Basically I am using Loco Translate to change language text in plugins and theme.

But I need to add Login page link in that text so user should click on link and

after login success user should same.

I am beginner in wordpress and I want to know how can I add links in .po file.

Basically I am using Loco Translate to change language text in plugins and theme.

But I need to add Login page link in that text so user should click on link and

after login success user should same.

Share Improve this question edited Dec 16, 2016 at 14:53 prosti 4,3234 gold badges26 silver badges45 bronze badges asked Dec 16, 2016 at 10:35 PravinPravin 211 silver badge4 bronze badges 1
  • ok but how can add links in there? – Pravin Commented Dec 16, 2016 at 12:03
Add a comment  | 

1 Answer 1

Reset to default 1

Don't add links, no need for HTML in there:

How about this:

$anchor = esc_html_x( 'Google', 'link text for google', 'txt-domain' );
$domain = esc_url( __( 'google', 'txt-domain' ) );  
$link   = sprintf( '<a href="https://%s">%s</a>', $domain, $anchor );
发布评论

评论列表(0)

  1. 暂无评论