Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 119948

Chouby on "[Plugin: Polylang] Add some do_action()"

$
0
0

I am not against adding actions and filters on developers request.

However, this one is not useful. Instead, you can use:

add_action("plugins_loaded", array(&$this, 'add_strings'));
public function add_strings() {
    pll_register_string('name', "your string to translate");
}

I used the action 'plugins_loaded' to demonstrate that the function is available as soon as Polylang is loaded, but you can use another action available on admin side, provided that it is fired between 'plugins_loaded' and 'admin_init'


Viewing all articles
Browse latest Browse all 119948

Trending Articles