Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 73026

[Polylang] Use of pll_register_string inside Widget ???

$
0
0

Replies: 0

Hi all,

I’m currently coding a widget for my website. I would like that a string (which is given by the user) is added to the String Translation tab of polylang, exactly as polylang already do for the title of all the widget.
So I try to call the function pll_register_string from inside the widget method update, like this:

if( function_exists('pll_register_string'))
{
    pll_register_string('no_event_text-sport_calendar', $instance['no_event_text']);
}

But no string is added in the string translation tab of polylang and I verified that the code inside the if is executed.

I’m missing something or is it just not possible to call pll_register_string from inside a widget method???

Thanks for your help 🙂


Viewing all articles
Browse latest Browse all 73026

Trending Articles