Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Polylang translates zenon lite
- */
- $config = get_option( 'optionsframework' );
- if (isset( $config['id'] ))
- add_filter('option_' . $config['id'], 'pll_optionsframework');
- function pll_optionsframework($options) {
- $translations = array(
- 'block1_text',
- 'block1_textarea',
- 'block2_text',
- 'block2_textarea',
- // add here other options to translate
- );
- foreach ($translations as $translation) {
- if (is_admin() && function_exists('pll_register_string'))
- pll_register_string('zenon lite', $options[$translation]);
- elseif (function_exists('pll__'))
- $options[$translation] = pll__($options[$translation]);
- }
- return $options;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement