Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Polylang for responsive theme
- */
- /*
- * This plugin is obsolete since Polylang 1.0 (the functionnality is now included in Polylang)
- */
- add_action('admin_init', create_function('', 'get_option("responsive_theme_options");')); // to call the option filter on admin side
- add_filter('option_responsive_theme_options', 'translate_responsive_theme_strings');
- function translate_responsive_theme_strings($options) {
- if (function_exists('pll_register_string')) { // test polylang is activated
- $strings = array('home_headline', 'home_subheadline', 'home_content_area', 'cta_text', 'cta_url');
- foreach ($strings as $str) {
- if (is_admin())
- pll_register_string('responsive theme', $options[$str]);
- else
- $options[$str] = pll__($options[$str]);
- }
- }
- return $options;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement