Add Polylang support for Customizer

Mô tả

Add Polylang support for Customizer

This plugin adds Polylang support for WordPress Customizer.

Features

  • Language switcher in Customizer.
  • Localized theme_mods and options for both default and custom made Customizer values.
  • Enable/disable forcing “The language is set from content” setting in Language->Settings->URL modifications

Prerequisite

  1. Polylang must be installed and activated.
  2. Languages must be set in Admin > Languages.
  3. If you have a static front page:
    1. Create a front page per each language.
    2. Select the front page in Admin > Settings > Reading per language.
  4. Expect customizer to use setting type = theme_mod (default) as in:

    $wp_customize->add_setting( ‘setting_id’, [ ‘type’ => ‘theme_mod’, ] );

    License

    This plugin is licensed under the GPL v2 or later.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

A copy of the license is included in the root of the plugin’s directory. The file is named LICENSE.

Important Notes

Licensing

This plugin is licensed under the GPL v2 or later; however, if you opt to use third-party code that is not compatible with v2, then you may need to switch to using code that is GPL v3 compatible.

For reference, here\’s a discussion that covers the Apache 2.0 License used by Bootstrap.

Credits

Original solution made by @soderlind is available here. Share some love! This is WordPress plugin version of his solution.

Ảnh màn hình

  • Polylang language dropdown in Customizer

Cài đặt

This plugin can be installed directly into your plugins folder \”as-is\”

or if you go to Admin panel > Plugins > Add new > Upload Plugin and select the archive containing this plugin.

It\’s safe to activate the plugin at this point. Because the plugin just injects some functionality – there will be no plugin menus or settings to play with.This plugin can be installed directly into your plugins folder \”as-is\”
or if you go to Admin panel > Plugins > Add new > Upload Plugin and select the archive containing this plugin.

Đánh giá

1 Tháng Hai, 2020
I've been running around nuts searching for decent plugin-ready solution to add Polylang functionality to WordPress Customizer and ran across GitHub repository which had this solution. So I polished it and converted it to plugin. Since then I have no need to manually add hooks, filters and additional scripts to add Polylang language support to Customizer.
Đọc tất cả 4 đánh giá

Người đóng góp & Lập trình viên

“Add Polylang support for Customizer” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

Nhật ký thay đổi

1.0.1

  • First release

1.0.2

  • Fixed issues with option rewriting and polylang translatable strings.

1.0.3

  • Fixed issues with pll_current_language() missing due to Polylang API being not included.

1.1.0

  • Added settings page & Enable/disable forcing “The language is set from content” setting in Language->Settings->URL modifications

1.1.1

  • Added quick settings link

1.1.2

  • Fixed missing includes

1.1.3

  • Added new SVN copy