+ curlang ) is now equal to the language of current post or term being edited (#19)
+* The sample permalink is now updated when changing the language in the Languages metabox
+* Revamp the wpml-config.xml reader to use simplexml instead of our custom xml parser
+* Improve support for the WPML API (including Hook API introduced in WPML 3.2)
+* Add support for translation of meta titles and descriptions of custom post types and custom taxonomies in Yoast SEO
+* Replace uncached functions by WPCOM VIP functions when available
+* Improve compatibility with WP 4.6
+* Fix parent category wrongly assigned to post when synchronizing children categories (#21)
+* Fix custom fonts not loaded when using multiple domains or subdomains
+* Fix remove_accents() not working for German and Danish (#24)
+* Fix incorrect static front pages urls on backend
+* Fix impossible to directly enter the page number in strings translation table (introduced in 1.9.3)
+* Fix conflict with WP Sweep (needs WP Sweep 1.0.8+)
+* Fix potential performance issue by querying only taxonomies to show in quick edit to filter the category checklist
+* Fix conflict (database error) with ReOrder-posts-within-categories plugin
+* Fix languages per page option not saved
+
+= 1.9.3 (2016-06-28) =
+
+* Pro: Allow to add slashes in url slugs translations
+* Pro: Fix archive links not using translated slugs
+* Pro: Fix visitor being redirected to 404 if his browser preference is set to an inactive language
+* Fix strings translations table always back to page 1 when submitting the form (#14)
+* Fix get_pages( array( 'lang' => '' ) ) not querying all the languages
+* Fix switching the admin language filter can override the static front page settings (#16)
+
+= 1.9.2 (2016-06-06) =
+
+* Pro: fix unreachable hierarchical custom post type posts when they are sharing slugs across languages
+* Fix missing argument 3 in icl_t
+* Fix conflict with WooCommerce product variations
+
+= 1.9.1 (2016-05-23) =
+
+* Pro: add compatibility with Beaver Builder
+* Pro: fix media wrongly created when adding a new media translation
+* Add azb, ceb, de_CH_informal, es_GT, mr, nl_NL_formal to the predefined list of languages
+* Fix the language switcher not linking to media translations for anonymous visitors
+
+= 1.9 (2016-04-27) =
+
+* Pro: add the possibility to translate custom post types slugs, taxonomies slugs and more
+* Pro: add the possibility to share the same post or term slug across languages
+* Pro: add the possibility to duplicate the content when creating a new translation
+* Pro: add the possibility to create all translations at once when uploading a media
+* Pro: add the possibility to disable a language
+* Add license and update management
+* Add inline docs for all filters and actions
+* When possible, the rel alternate hreflang now display only the language code (without the country code)
+* When combined with flags in the language switcher, wrap the language name inside tags
+* Add customizer selective refresh support for the language switcher widget ( needs WP 4.5+ )
+* Fix dynamic options of the language switcher widget not working in the customizer
+* Fix possible error 404 on page shortlink when using subdomains or multiple domains
+* Fix get_adjacent_post() and wp_get_archives() for untranslated post types ( needs WP 4.4+ )
+* Fix language homepage urls not present in Yoast SEO sitemap (when the homepages display posts)
+
+= 1.8.5 (2016-04-03) =
+
+* Revert from $_SERVER['PHP_SELF'] to $_SERVER['SCRIPT_FILENAME'] to detect if the user is on login/register/signup page
+* Fix incompatibility introduced by WP 4.5 in Edit single taxonomy term screen
+* Fix existing post overriden when creating a language and a conflicting plugin sets the global $post on languages pages
+
+= 1.8.4 (2016-03-06) =
+
+* Revert canonical redirection of static front page when combining plain permalinks + default language hidden in url (introduced in 1.8.2)
+
+= 1.8.3 (2016-03-04) =
+
+* fix: All pages are redirected to the home page on some installations (introduced in 1.8.2)
+
+= 1.8.2 (2016-03-02) =
+
+* Add support for the 'wpml_get_default_language()' function from the WPML API
+* Stop blocking saving settings when errors are detected (invalid domains)
+* Use publicly_queryable => true instead of public => true for the language taxonomy (WP 4.5+)
+* fix: PHP notice when pll_default_language() is called before a language is created
+* fix: PHP notice undefined property PLL_Language::$page_on_front
+* fix: canonical redirection of static front page when combining plain permalinks + default language hidden in url
+* fix: YARPP compatibility broken in v1.8
+* fix: Remove the delete link for translations of the default category (introduced back by WP 4.3)
+* fix: settings not displayed with WP 4.1 or older
+
+= 1.8.1 (2016-01-31) =
+
+* Update the list of Facebook locales used for Opengraph support with Yoast SEO and Jetpack
+* fix: secondary query with translated post type and untranslated taxonomy mixes languages (introduced in 1.8)
+* fix: issue with paged static front page when hiding the default language in url
+* fix: potential issue with cache after synchronizations
+* fix: trailing slash added to canonical home url outputed by Yoast SEO when using default permalinks
+
+= 1.8 (2016-01-19) =
+
+* Minimum WordPress version is now 4.0
+* Add ary, bn_BD, en_ZA, es_AR, fr_CA and fr_BE to the predefined languages list
+* Adopt WordPress coding standards
+* New structure for translated posts and terms (=> several methods of PLL_Model are deprecated).
+* Revamp the management of the static front page and page for posts
+* Improve performance for navigation menus with a lot of pages
+* The Polylang and WPML API are now loaded when 'plugins_loaded' is fired (on frontend only if at least one language has been defined)
+* Add 'pll_get_post_translations()' and 'pll_get_term_translations()' to the API
+* Add filter 'pll_cookie_expiration' to change the cookie expiration time
+* Add support for 'wpml_get_language_information()' function from the WPML API
+* The default language is now managed directly from the languages list table
+* Various accessibility improvements
+* It is now possible to choose the languages flags from the available list (custom flags on frontend still work as previously)
+* Revamp the settings page (now a list table with inline configuration)
+* Add an option to remove all data when uninstalling the plugin
+* Add test of subdomains and domains accessibility
+* Add post state for translations of the front page and posts page
+* Add better support of the customizer menus introduced in WP 4.3
+* Media taxonomies (created by 3rd party plugins) are now filtered by language when editing a media
+* Synchronization of taxonomies (created by 3rd party plugins) and meta are now enabled for media
+* The 'hreflang' tag now refers to the locale instead of the 2-letters language code
+* Workaround for WordPress locales not being W3C valid (see #33511)
+* Workaround a bug in Nextgen Gallery causing redirect on album
+* Add compatibility with Duplicate Post plugin to avoid duplicated post keeping the link to translations
+* Add compatibility with Jetpack Related Posts
+* fix: incorrect rewrite rules after changing how the language is set (need to flush rewrite rules after this)
+* fix: password protected pages don't work on multiple domains
+* fix: ensure that the page parent is in the correct language when using bulk edit
+* fix: is_tax set on category and post tags archives when it should not
+* fix: automatically added new top-level pages to menus are not filtered by language
+* fix: nav menus locations are messed when changing the default language
+* fix: error 404 for untranslated taxonomies pages
+* fix: single posts and pages links do not include the language code when using the default permalinks and forcing the language code in url
+* fix: missing trailing slash on home url when using default permalinks or a static front page
+* fix: sticky visibility is copied to new translation only if the synchronization is activated
+* fix: remove "» Languages » [language name]" from the feed title
+* fix: spaces are not honored when searching strings translations
+* fix: default language not set and terms translations not correctly imported when using WordPress Importer
+* fix: the browser language detection does not differentiate 'en_US' and 'en_GB'
+* fix: non alphanumeric characters query vars values lead to an infinite redirection loop on static front pages
+* fix: user profile not saved for a language when the language code contains a "-"
+* fix: non translated posts page always link to the static front page even when they should not
+* fix: remove hreflang="x-default" when using one domain per language
+* fix: deprecated function notice in WP 4.5 alpha
+* fix: wrong url for attachments when media are translated and using subdomains
+* fix: wrong url for unattached attachments when using subdirectories (since WP 4.4)
+* fix: wrong url scheme for custom flags
+
+= 1.7.12 (2015-11-13) =
+
+* The language taxonomy is now public for compatibility with WP 4.4
+* fix: nav menus locations are not correctly populated in customizer in WP 4.4
+* fix: the termmeta table was still deleted at upgrade
+* fix: fatal error when using the argument 'post_id' in 'pll_the_languages()' (introduced in 1.7.11) [props EKesty](https://wordpress.org/support/topic/bug-on)
+* fix: potential notice in 'pll_the_languages()' [props mattkeys](https://wordpress.org/support/topic/bug-on)
+
+= 1.7.11 (2015-10-15) =
+
+* fix: conflict with GET ajax requests sent by the jquery method load
+* fix: notice in frontend-nav-menu.php at line 211 (introduced in 1.7.10) [props Jesse Graupmann](https://wordpress.org/support/topic/warning-and-notice-on-upgrade)
+* fix: the parent list in page attributes metabox is not in the correct language (introduced in 1.7.10)
+* fix: error 404 for attachments
+* fix: the language switcher is not displayed when combining "Forces link to front page" and "Hides languages with no translation"
+
+= 1.7.10 (2015-09-28) =
+
+* Add Occitan translation contributed by [Cédric Valmary](http://www.totenoc.eu/)
+* Add de_DE_formal, en_NZ, es_CO, hy, oci, ps and tl to the predefined languages list
+* Add the filter 'pll_predefined_languages' and the actions 'pll_language_edit_form_fields' and 'pll_language_add_form_fields'
+* the termmeta table (used in Polylang < 1.2) is no more deleted when uninstalling the plugin (as it will soon be included in WP)
+* fix: prevent creating a media translation if one already exists
+* fix: Attempt to translate the nav menus for themes registering a theme location but not using it in wp_nav_menu()
+* fix: Jetpack infinite scroll
+* fix: issue with terms languages when two languages have the same name
+* fix: notices when deleting a tag and Lingotek is active
+* fix: the languages cache is not cleaned when updating the site home url
+* fix: conflict with the theme Ambition
+* fix: front page canonical url displayed by Yoast SEO
+* fix: typo in options definition at install [props null.bit](https://wordpress.org/support/topic/suggestions-for-two-new-filters?replies=5#post-7466159)
+* fix: error when adding a term in a non-translated taxonomy
+
+= 1.7.9 (2015-08-17) =
+
+* Minimum WordPress version is now v3.9
+* Add: hreflang="x-default" on front page when the default language code is not hidden in urls
+* fix: remove hreflang links in html head section of paged archives to please Google
+* fix: conflict with WPSEO sitemap caching when using multiple domains. [props Junaid Bhura](https://wordpress.org/support/topic/wp-seo-sitemap-and-translation-subdomain-issue?replies=8#post-7113817)
+* fix: change the order of strings translations columns for better display on mobile devices in WP 4.3
+* fix: various issues with nav menus and customizer in WP 4.3
+* fix: correctly disallow unchecking both show names and show flags in the language switcher form
+
+= 1.7.8 (2015-07-21) =
+
+* fix: conflict with PHP < 5.4 introduced in 1.7.7
+
+= 1.7.7 (2015-07-20) =
+
+* Add Romanian translation contributed by uskro
+* Add Japanese translation contributed by [Eiko Toda](http://www.eikotoda.com)
+* Update French translation contributed by [fxbenard](http://fxbenard.com/)
+* The language locale is now validated with the same pattern as in WP 4.3. See #28303
+* fix: make sure that the language switcher never finds translations for untranslated post types (could occur when the post type was previously translated)
+* fix: display the default category according to the admin language filter in settings->writing
+* fix: flushing rewrite rules at network activation and de-activation is back. [props RavanH](https://polylang.wordpress.com/2015/06/10/polylang-1-7-6-and-multisite/comment-page-1/#comment-1138)
+* fix: avoid a conflict with WP Super Cache preloading (loading 'polylang_mo' posts which are 404). [props ecdltf](https://wordpress.org/support/topic/polylang_mo-and-404s-take-2)
+* fix: customizer menus issues introduced by changes in WP 4.1
+* fix: strings translations are not saved when pressing enter
+* fix: it is not possible to de-activate the translation for custom post types and taxonomies from wpml-config.xml
+* fix: conflict whith plugins using stringified json in ajax requests
+
+= 1.7.6 (2015-06-10) =
+
+* Add Galician translation contributed by [Toño Calo](http://fedellar.wordpress.com/)
+* fix: incorrect post type archive link for untranslated post types
+* fix: notices in wp-import.php
+* fix: avoid flushing rewrite rules at network activation and de-activation
+* fix: the note below the category list table displays the default category according to the admin language filter
+* fix: wrong future posts permalinks
+* fix: deleting a media translation deletes the file too
+* fix: when using persistent object cache, get_terms is not always filtered by the correct language on admin side
+* fix: it is possible to create two categories having the same translation
+* fix: fatal error when using the dropdown language switcher in WP < 4.1
+
+= 1.7.5 (2015-05-11) =
+
+* Add 'pll_languages_list' filter
+* fix: warning when a plugin calls 'icl_object_id' with an untranslated post type (seen in ACF 4.4.1)
+* fix: the language is not correctly set from the url when using PATHINFO permalinks (introduced in 1.6!)
+* fix: notice when a search is filtered by a taxonomy term in a different language
+
+= 1.7.4 (2015-05-03) =
+
+* fix: translated taxonomies and post types from wpml-config.xml are not filtered on frontend (introduced in 1.7.2)
+* fix: WPML strings translations not always loaded (introduced in 1.7)
+* fix: $.ajaxPrefilter() may not work as expected [props ScreenfeedFr](https://wordpress.org/support/topic/ajaxprefilter-may-not-work-as-expected)
+* fix: can't hide the language code for the default language when using subdomains
+* fix: incorrect static front page url when hiding the default language information
+* fix: an untranslated posts page may display posts in all languages
+* fix: javascript error when changing the language of a hierarchical post type from the languages metabox in WP 4.2
+* fix: subdomains urls are malformed when the main site uses www.
+* fix: suggest tags are not filtered in quick edit
+* fix: parent page dropdown list not filtered in quick edit
+
+= 1.7.3 (2015-04-11) =
+
+* the transient 'pll_languages_list' now stores an array of arrays instead of an array of PLL_Language objects
+* fix: fatal error for users hosted at GoDaddy (due to PLL_Language objects stored in a transient)
+* fix: additional query vars are removed from home page
+* fix: categories are not filtered by the admin language switcher in posts list table (introduced in 1.7)
+* fix: when using multiple domains, the domain url is lost when modifying the language slug
+* fix: the queried object is incorrectly set for author archives (introduced in 1.6.5)
+* fix: notice when a nav menu assigned to a translated nav menu location has been deleted
+* fix: no canonical redirection when using pretty permalinks and querying default permalinks
+
+= 1.7.2 (2015-03-23) =
+
+* fix: comments are filtered for posts in a post type not managed by Polylang
+* fix: translated static front page don't work when setting PLL_CACHE_HOME_URL to false (introduced in 1.7)
+* fix: the query for taxonomies on custom post types is broken (when adding the language code to the url)
+
+= 1.7.1 (2015-03-20) =
+
+* fix: wrong redirection when using a static front page and replacing the page name by the language code (introduced in 1.7)
+
+= 1.7 (2015-03-19) =
+
+* Minimum WordPress version is now v3.8
+* Add new languages to the predefined languages list: Swiss German, Hazaragi
+* Add compatibility with nested tax queries introduced in WP 4.1
+* Add compatibility with splitting shared terms to be introduced in WP 4.2
+* Add the possibility to change the domain in the default language when using multiple domains (avoids a conflict with the domain mapping plugin)
+* Add the possibility to set the language from the code in url when using default permalinks
+* Adding the language code in url is now default at first activation (should improve the out of the box compatibility with other plugins and themes)
+* Add new language switcher option to hide a language with no translation
+* pll_the_languages() now outputs the js code to handle language change in dropdown list (as done by the widget)
+* Improve performance by using base64 encoded flags + various slight optimizations
+* Improve protection against chained redirects
+* The find posts list is now filtered per media language when clicking on attach link in Media library
+* Copy alternative text when creating a media translation
+* The category checklist in quick edit is now filtered per post language instead of admin language filter
+* Quick and bulk language edit don't break translations anymore if the new language is free
+* Make it impossible to change the language of the default categories
+* Make sure that a default category defined in settings->writing is translated in all languages
+* Tweak css for mobiles in add and edit term form
+* Tweak the query getting the list of available posts in the autocomplete input field in the post languages metabox
+* fix: after adding a term translation, need to refresh the page before adding a new term
+* fix: term translations rows are not modified in list table when a term is added / deleted or inline edited
+* fix: post translations rows are not modified in list table when a post is inline edited
+* fix: using brackets in language name breaks strings translations
+* fix: quick edit may conflict with other plugins
+* fix: impossible to use several dropdown languages widgets
+* fix: pll_the_languages() may display a dropdown with empty options
+* fix: the categories widget does not work correctly with dropdown
+* fix: autosave post always created after manual save
+* fix: tax query not filtered by language when using 'NOT IN' operator on a translated taxonomy
+* fix: incorrect translation url for searches filtered by taxonomy
+* fix: backward incompatibility for edited_term_taxonomy action introduced in WP 4.2
+* fix: the home link may be incorrect on MS Windows
+* fix: tags in wrong language may be assigned when bulk editing posts in several languages
+* fix: tags created when bulk editing posts are not assigned any language
+* fix: Illegal string offset 'taxonomy' introduced in v1.6.5
+* fix: Undefined property: WP_Query::$queried_object_id when calling pll_the_languages(array('raw' => 1)) in a function hooked to 'wp'. props [KLicheR](https://wordpress.org/support/profile/klicher)
+* fix: Notice in admin.php when used with MailPoet plugin
+
+= 1.6.5 (2015-02-18) =
+
+* Add new correspondances between WordPress locales and Facebook locales (for WPSEO and Jetpack users)
+* fix: quick draft posts are always assigned the default category in the default language
+* fix: Notice: Undefined offset: 0 in wp-includes/query.php introduced in WP 4.1
+* fix: is_tax and is_archive are not correctly set when a custom taxonomy term is queried
+* fix: conflict introduced by WPSEO 1.7.2+
+
+= 1.6.4 (2015-02-01) =
+
+* Add es_MX to predefined languages list
+* Add compatibility with WordPress SEO sitemaps for multiple domains and subdomains
+* fix: a new post is assigned the wrong (untranslated) default category if no category is assigned by the user
+* fix: the home links now have the right scheme even if PLL_CACHE_HOME_URL is not set to false
+* fix: fatal error when using old versions of WPSEO (I should do what I tell other to do!)
+* fix: strings translations are not switched when using switch_to_blog
+
+= 1.6.3 (2015-01-09) =
+
+* Add Georgian translation contributed by [Tours in Georgia](http://www.georgia-tours.eu/)
+* fix: WXR export does not include the language of untranslated terms (will now work only for newly saved terms)
+* fix: better cleaning of DB when translated objects are deleted
+* fix: incorrect (ajax) translations links when modifying a term language
+* fix: warning: Illegal string offset 'taxonomy' introduced by the combination of WP 4.1 and some plugins.
+
+= 1.6.2 (2014-12-14) =
+
+* fix: bugs and inconsistencies compared to WPML in 'icl_get_languages' (should fix a conflict with Avada)
+* fix: https issue
+* fix: stop displaying an error when adding en_US as new language (translation not downloaded)
+* fix: infinite redirect loop on (unattached) attachment links
+* fix: impossible to add tags in post quick edit (introduced in 1.5)
+* fix: the customizer does not land to the right page when cumulating: static front page + page name in url + default language code not hidden
+* fix: read parent theme wpml-config.xml before child theme
+* fix: add protection to avoid empty language
+* fix: page preview link again
+
+= 1.6.1 (2014-11-19) =
+
+* Add Brazilian Portuguese translation contributed by [Henrique Vianna](http://henriquevianna.com/)
+* Improve compatibility with Types: allow custom fields to be populated when creating a new translation
+* Make it impossible to remove the translations of the default category
+* Fix: possibility to add a path when using multiple domains (same path for all languages) broken since v1.5.6
+* Fix: preview link for non default language when using multiple domains
+* Fix: error displayed when setting the static front page and only one language has been defined
+* Fix: revert changes on rewrite rules with front introduced in 1.6
+* Fix: conflict with WordPress SEO when no language has been created
+
+= 1.6 (2014-10-27) =
+
+* Add Croatian translation contributed by Bajro
+* Add new languages to predefined languages list: Azerbaijani, English (Australia), English (UK), Basque
+* Add flag in front of the language select dropdown for posts and terms
+* Add widget text translation
+* Add opengraph support for locale and translations when WordPress SEO or Jetpack are activated
+* Add error message if attempting to assign an untranslated page as static front page
+* Add 'pll_sanitize_string_translation' filter to sanitize registered strings translations when saved
+* Fix: change the en_US flag to US flag. The UK flag is now associated to en_GB
+* Fix: change Belarussian locale from be_BY to bel to in agreement with translate.wordpress.org
+* Fix home pages duplicate urls when using domains or subdomains
+* Fix rewrite rules with front
+* Fix: terms are always in default language when created from post bulk edit
+
+= 1.5.6 (2014-10-11) =
+
+* Fix: the admin language filter is not active for paginated taxonomy in nav menu admin panel
+* Fix: wrong redirection if a domain is a substring of another domain (ex: mysite.com and mysite.co)
+* Fix: impossible to translate numeric values in options defined in wpml-config.xml
+* Fix: call to undefined method PLL_Links::get_translation_url() with Avada theme
+* Fix: manage_{$this->screen->taxonomy}_custom_icolumn is a filter and not an action
+
+= 1.5.5 (2014-09-10) =
+
+* Fix: missing argument 4 in icl_translate
+* Fix: conflict with Vantage theme
+* Fix: possible issue with cookie domain on 'localhost'
+* Fix: filtering string translations does not work when the group name contains a space
+* Fix: Possible 404 error for attachments
+* Fix: PHP notice when a shared term is not translated in all taxonomies
+
+= 1.5.4 (2014-08-13) =
+
+* Add new API functions: pll_get_post_language, pll_get_term_language, pll_translate_string
+* Add better compatibility with Jetpack 3
+* Fix: attachments don't get any language when uploaded from frontend
+* Fix: authors cannot create tags
+* Fix: too restrictive capability checks for some edge cases
+* Fix: conflict with WPSEO: taxonomy metas cannot be saved
+
+= 1.5.3 (2014-07-12) =
+
+* Add: Capability check before creating links in post list table
+* Add: Possibility not to cache languages objects with option PLL_CACHE_LANGUAGES (for GoDaddy users)
+* Fix: Saving a header or a background in menu Appearance resets nav menus locations (introduced in 1.5)
+* Fix: sub-sub-options and deeper levels defined in wpml-config.xml are not translated
+* Fix: Fatal error when creating a new site when Polylang is network activated (introduced in v1.5.1)
+* Fix: Admin language forced to English when activating Polylang (before creating any new language)
+* Fix: 'pll_count_posts' second parameter not taken into account
+* Fix: 'edit-post' and 'create-posts' capabilities are not differentiated when saving a post
+
+= 1.5.2 (2014-06-24) =
+
+* Fix: Revert post translations terms cleaning introduced in 1.5 as it seems to cause problems
+* Fix: Impossible to delete a biographical info (introduced in 1.5)
+* Fix: Security issue reported by [Gregory Viguier](http://www.screenfeed.fr/)
+
+= 1.5.1 (2014-06-19) =
+
+* Add: filter 'pll_settings_tabs' and action 'pll_settings_active_tab_{$tab}'
+* Add: possibility to add a path when using multiple domains (same path for all languages)
+* Fix: Bad redirection if /language/ is added to urls (introduced in 1.5)
+* Fix: Nav menu locations are not saved in customizer (introduced in 1.4)
+* Fix: Unable to unset nav menu locations
+* Fix: Incorrect link for date archives in language switcher (introduced in 1.5)
+* Fix: Fatal error when using featured content in Twenty Fourteen
+* Fix: Posts bulk edit broken (introduced in 1.5)
+* Fix: Polylang does not play nice with switch_to_blog
+* Fix: Warning: reset() expects parameter 1 to be array, null given in admin-filters-columns.php on line 81
+
+= 1.5 (2014-05-29) =
+
+* Add Ukrainian translation contributed by [http://getvoip.com/](http://getvoip.com/)
+* Refresh translation metaboxes (again): now translated posts are chosen from an autocomplete input field
+* Categories and post tags translations are also chosen in an automplete input field
+* Better error management on languages pages
+* Use Dashicons instead of Icomoon icons for WP 3.8+
+* Check if translated post is readable by the current user before displaying the language switcher
+* Minimum Twenty Fourteen version is now 1.1
+* Code cleaning
+* Add support for Quick draft introduced in WP 3.8
+* Add support for object cache plugins for recent posts and recent comments widgets
+* Add support for pages with modified query in the language switcher (ex: when multiple post types queried on the same page)
+* Add new API functions: pll_languages_list, pll_set_post_language, pll_set_term_language, pll_save_post_translations, pll_save_term_translations, pll_count_posts
+* Add new filter pll_the_languages_args
+* Add support for ICL_LANGUAGE_CODE == 'all' on admin side
+* Fix: Galician flag
+* Fix: static page on front pagination is broken
+* Fix: search url may be broken
+* Fix: PHP notice in icl_get_languages
+* Fix: more robust way of detecting language in url when using directory
+* Fix: delete translations terms orphans in database
+* Fix: inconsistent behavior when setting page on front from customizer
+* Fix: deleting a category assigns posts to wrong default category
+* Fix: quick edit breaks synchronization
+* Fix: some security issues
+
+= 1.4.5 (2014-04-19) =
+
+* Fix: Notice when combined with WPSEO 1.5+
+* Fix: Impossible to disable a widget language filter once set (introduced in 1.4.4)
+* Fix: Unexpected redirection of the homepage with language code when permalink structure has no trailing slash (introduced in 1.4.4)
+* Fix: Some installs lead to wrong redirection when using domains (introduced in 1.4.4)
+* Fix: Possible infinite redirection while previewing posts (introduced in 1.4.4)
+* Fix: Uploaded medias don't get a language since WP 3.9
+* Fix: Compatibility with Twenty Fourteen Ephemera widget in the version shipped with WP 3.9
+
+= 1.4.4 (2014-04-09) =
+
+* Add: Compatibility with widgets customizer introduced in WP 3.9
+* Fix: No post in translation dropdown after switching the language in edit post (introduced in 1.4.3)
+* Fix: No canonical redirection when there is no language code in url and the language code is not hidden for the default language
+* Fix: Suppress language cookie when using multiple domains
+
+= 1.4.3 (2014-03-22) =
+
+* Add: Serbian translation contributed by Sinisa
+* Add: Myanmar translation contributed by Sithu Thwin
+* Fix: comment form redirects to wp-admin when using multiple domains or subdomains.
+* Fix: fatal error with old versions of PHP (tested on PHP 5.2.4)
+* Fix: Bad gateway experienced by users hosted by wpengine.com
+* Fix: links got from tiny MCE link button are filtered with admin language filter instead of current post language
+* Fix: possibly wrong redirection in check_language_code_in_url when using multiple domains or subdomains
+
+= 1.4.2 (2014-02-24) =
+
+* Add: check multiple post types in PLL_Model::count_posts
+* Fix: error 404 on category links when setting the language by content (introduced in 1.4.1)
+* Fix: PHP notices in frontend-nav-menu.php with Artisteer themes
+* Fix: decrease the memory usage of untranslated posts list
+* Fix: home page not correctly redirected to canonical when using page on front and page name is kept in url
+
+= 1.4.1 (2014-02-16) =
+
+* Add: Czech translation contributed by [Přemysl Karbula](http://www.premyslkarbula.cz)
+* Fix: the displayed language is not correct in quick edit for categories and post tags
+* Fix: the language switcher does not display the correct link for translated parent categories if only children have posts
+* Fix: 3rd parameter of icl_object_id is not optional
+* Fix: issue when combining multiple domains and browser detection -> the combination is now forbidden
+* Fix: conflict Shiba Media Library: link between media translations is lost when using media quick edit
+* Fix: notice when using taxonomies in wpml-config.xml
+* Fix: incorrect post format link
+* Fix: Twenty Fourteen Ephemera widget strings are not translated
+
+= 1.4 (2014-01-22) =
+
+* Add Traditionial Chinese translation contributed by [香腸](http://sofree.cc/)
+* Minimum WordPress version is now v3.5
+* Refresh translations metaboxes: now translated posts are chosen in a dropdown list
+* Check if translated archives for category, tag and post format are empty before displaying the language switcher
+* Add specific management of translated featured tag in Twenty Fourteen
+* Add the possibility not to cache homepage urls with option PLL_CACHE_HOME_URL (for users having several domains).
+* The function get_pages is now filtered by language
+* Ajax requests on frontend are now automatically detected. It is no more necessary to set 'pll_load_front' :)
+* Various performance improvements
+* 'pll_get_post_types' and 'pll_get_taxonomies' filters must be added *before* 'after_setup_theme' is fired
+* Pre 1.2 data will be removed from DB at first upgrade at least 60 days after upgrade to 1.4
+* Removed some duplicate code between admin and frontend
+* Bug correction: incorrect pagination when using domains or subdomains
+* Bug correction: post format link not translated
+* Bug correction: impossible to use child terms with same name in hierarchical taxonomies
+* Bug correction: the terms list table is filtered according to new translation language instead of admin language filter
+
+= 1.3.1 (2013-12-13) =
+
+* Bug correction: fatal error on settings page if a static front page without language is set
+* Bug correction: wrong home url when using different domains per language
+
+= 1.3 (2013-12-11) =
+
+* Refresh admin UI for better look in WP 3.8 and more dynamic comportment
+* The "Detect browser language" option does now also controls returning visits (based on cookie).
+* Improved performance by optimizing some queries for WP 3.5+
+* The user biography in default language is now stored in default WordPress usermeta
+* Add language parameter in API function pll_home_url and allow to call it on admin side
+* Calling 'get_terms' with the 'lang' parameter now uses a cache object per language
+* Bug correction: conflict with unstranslated taxonomies
+* Bug correction: possible malformed translation archive url in language switcher
+* Bug correction: a wrong language may be displayed in quick edit dropdown
+* Bug correction: it is possible to add multiple translations (in the same language) for a single taxonomy term
+* Bug correction: non public post types and taxonomies are visible in Polylang settings
+* Bug correction: the language is always chosen from cookie (or browser preferences) in some installations
+* Bug correction: Firefox language preference is not recognized when comparison is made on locale (instead of ISO 639-1 language code)
+* Bug correction: incorrect tax_query in PLL_Auto_Translate
+
+= 1.2.4 (2013-11-28) =
+
+* Better support for theme customizer
+* Bug correction: admin bar search does not filter by language
+* Bug correction: possible conflict on secondary query when querying taxonomies or single page
+* Bug correction: post type is not included in url when editing or adding a term translation
+* Bug correction: various warnings and PHP notices
+
+= 1.2.3 (2013-11-17) =
+
+* Avoid fatal error when ugrading with Nextgen Gallery active
+* Bug correction: menus locations of non default language are lost at theme deactivation
+* Bug correction: impossible to set menus locations of non default language in some specific cases
+* Bug correction: bbpress admin is broken
+
+= 1.2.2 (2013-11-14) =
+
+* Updated Polish translation thanks to [Bartosz](http://www.dfactory.eu/)
+* Delay strings translations upgrade from 'wp_loaded' to 'admin_init' to avoid fatal error when wp-ecommerce is active
+* Remove Jetpack infinite scroll compatibility code as it seems useless with new Polylang 1.2 code structure
+* Bug correction: fatal error when doing ajax on frontend
+* Bug correction: ICL_LANGUAGE_CODE incorrectly defined when doing ajax on frontend
+* Bug correction: ['current_lang'] and ['no-translation'] indexes disappeared from pll_the_languages raw output
+* Bug correction: invalid argument supplied for foreach() in /polylang/include/mo.php on line 57
+* Bug correction: cookie may not be correctly set
+* Bug correction: languages columns may not be displayed in custom post types and custom taxonomies tables
+
+= 1.2.1 (2013-11-11) =
+
+* Update badly encoded Latvian translation
+* Suppress one query in PLL_WPML_Config when not in multisite
+* Bug correction: strings translations are not correctly upgraded
+* Bug correction: nav menus locations are not correctly upgraded for non default language
+
+= 1.2 (2013-11-10) =
+
+This version does include important changes in database. More than ever, make a database backup before upgrading
+
+* Add Arabic translation contributed by [Anas Sulaiman](http://ahs.pw/)
+* Major rewrite with new structure
+* Change the language and translations model from meta to taxonomy (no extra termmeta table created anymore)
+* Move the strings translations from option to a custom post type
+* Add support for language code in subdomain and for one different domain per language (experimental)
+* Add support of WordPress Importer plugin. Export must have been done with Polylang 1.2+ (experimental)
+* Add support for theme navigation customizer (was de-activated by Polylang since WP 3.4)
+* Request confirmation for deleting a language
+* Better management of default category for each language
+* Now check if date and post type archives are translated before displaying the language switcher
+* Update management of the 'copy' action of the custom fields section in wpml-config.xml
+* Add support for ICL_LANGUAGE_CODE and ICL_LANGUAGE_NAME of the WPML API on admin side
+* Add support of WPSEO custom strings translations when the language is set from content
+* Modify admin language filter for valid html and better visibility
+* Synchronization is now disabled by default (due to too much conflicts / questions on the forum)
+* Include rel="alternate" hreflang="x" selflink per google recommendation
+* Improve inline documentation
+* Bug correction: wrong datatype for second argument in polylang/include/auto-translate.php (introduced in 1.1.6)
+* Bug correction: same id is used for all language items in menu
+* Bug correction: wpml-config.xml file not loaded for sitewide active plugins on network installations
+* Bug correction: page parent dropdown list (in page attributes metabox) not correctly displayed when switching from a language with empty list
+
+= 1.1.6 (2013-10-13) =
+
+* Add the possibility to display the upgrade notice on plugins page
+* Bug correction: Illegal string offset 'taxonomy' in polylang/include/auto-translate.php
+* Bug correction: user defined strings translations are not loaded on admin side
+* Bug correction: untranslated post types are auto translated
+* Bug correction: tags are not added to post when the name exists in several languages and they are not translations of each other
+
+= 1.1.5 (2013-09-15) =
+
+* Add compatibility with Aqua Resizer (often used in porfolio themes)
+* Add support of 'icl_get_default_language' function from the WPML API
+* Remove the 3 characters limitation for the language code
+* Change default names for zh_CN, zh_HK, zh_TW
+* Bug correction: urls are modified in search forms
+
+= 1.1.4 (2013-08-16) =
+
+* Add simplified Chinese language contributed by [Changmeng Hu](http://www.wpdaxue.com)
+* Add Indonesian language contributed by [ajoull](http://www.ajoull.com/)
+* Bug correction: nav menu locations are lost when using the admin language filter
+* Bug correction: the cookie is not set when adding the language code to all urls (introduced in 1.1.3)
+
+= 1.1.3 (2013-07-21) =
+
+* Add Venetian language contributed by Michele Brunelli
+* Bug correction: wrong rewrite rules for non translated custom post type archives
+* Bug correction: 'post_id' parameter of pll_the_languages does not work
+* Bug correction: warning in wp_nav_menu_objects with Artisteer generated themes
+* Bug correction: warning when used together with theme my login plugin
+* Bug correction: language slug is modified and translations are lost when creating a nav menu with the same name as a language
+
+= 1.1.2 (2013-06-18) =
+
+* Posts and terms now inherit parent's language if created outside the standard WordPress ui
+* Improve the compatibility with the plugins Types and The Events Calendar, and again with WordPress SEO
+* Improve performance
+* Improve html validation
+* Add 'raw' argument to 'pll_the_languages'
+* Add the filter 'pll_translation_url'
+* Bug correction: no language is set for a (translated custom taxonomy) term when added from a (non tranlated) custom post type edit page
+* Bug correction: warning if 'get_terms' is called with a non-array 'include' argument (introduced in 1.1.1)
+* Bug correction: warning if the menu language switcher has nothing to display
+
+= 1.1.1 (2013-05-20) =
+
+* Move nav menu language switcher split from 'wp_nav_menu_objects' to 'wp_get_nav_menu_items' filter
+* Add the filter 'pll_redirect_home'
+* Automatically translate ids in 'include' argument of 'get_terms' (useful for the menus in the Suffusion theme)
+* Add compatibility with Jetpack infinite scroll
+* Bug correction: rtl text direction not set when adding the language code to all urls (introduced in 1.1)
+* Bug correction: hide again navigation panel in theme customizer as it still doesn't work
+* Bug correction: is_home not set on translated page when searching an empty string
+* Bug correction: fatal error when creating a post or term from frontend (introduced in 1.1)
+* Bug correction: attachments may load a wrong language when media translation was enabled then disabled
+* Bug correction: warning when querying posts before the action 'wp_loaded' has been fired (in auto-translate.php)
+* Bug correction: potential issue if other plugins use the filter 'get_nav_menu'
+* Bug correction: interference between language inline edit and search in admin list tables
+* Bug correction: auto-translate breaks queries tax_query when the 'field' is set to 'id'
+* Bug correction: search is not filtered by language for default permalinks (introduced in 1.1)
+* Tests done with WP 3.6 beta 3 and Twenty thirteen
+
+= 1.1 (2013-05-10) =
+
+* When adding the language to all urls, the language is now defined in (plugins_loaded, 1) for better compatibility with some plugins (WordPress SEO)
+* When querying posts and terms, ids are now automatically translated
+* Add the possibility to group string translations
+* Add the possibility to delete strings registered with 'icl_register_string'
+* Move the option 'polylang_widgets' in general polylang options
+* Better integration of the multilingual nav menus (everything is now integrated in the menus page of WordPress
+* The language switcher is now a menu item which can be placed everywhere in a nav menu
+* Posts or terms created from frontend are now assigned the current language (or another one if specified in the variable 'lang')
+* Bug correction: continents-cities-xx_XX.mo not downloaded
+* Bug correction: a gzipped 404 page is downloaded when a mo file does not exist on WordPress languages files repository
+* Bug correction: post_date_gmt not synchronized together with post_date
+* Tests done with WP 3.6 beta 2 and Twenty thirteen
+
+= 1.0.4 (2013-04-08) =
+
+* Add Estonian translation contributed by [Ahto Naris](http://profiles.wordpress.org/ahtonaris/)
+* Now compatible with languages files stored in wp-content/languages/themes
+* Bug correction: page preview does not work when adding the language code to all urls
+* Bug correction: error when a post type or taxonomy label is not a string
+* Bug correction: admin text section of wpml-config.xml (introduced in 1.0.3)
+* Bug correction: infinite redirect loop when querying an unattached media and the language code is added to all urls
+* Bug correction: the text direction is not set from Polylang options when the language code is added to all urls
+* Bug correction: get_adjacent_post is filtered by language even for post types without language
+* Bug correction: the home url is not not in the correct language in wp-login.php
+* Bug correction: the language is not correctly set when using date and name permalinks (introduced in 1.0.3)
+
+= 1.0.3 (2013-03-17) =
+
+* Add Catalan translation contributed by [Núria Martínez Berenguer](http://nuriamb.capa.webfactional.com)
+* Add Ukrainian translation contributed by [cmd soft](http://www.cmd-soft.com/)
+* Improve compatibility with WordPress SEO (sitemap for categories and tags)
+* A query is no more filtered by language when setting the parameter 'lang' to an empty value
+* Add the possibility to create a custom wpml-config.xml file in wp-content/polylang/
+* Bug correction: custom menus are not displayed on search page (introduced in 1.0.2)
+* Bug correction: sql error when filtering terms by language (introduced in 1.0.2)
+* Bug correction: SSL doesn't work properly
+* Bug correction: php notice on IIS servers
+* Bug correction: clicking on the radio buttons in the admin language switcher does not work in Chrome
+* Bug correction: on multisite, the signup page is redirected to the home page
+* Bug correction: date archives are not correctly filtered for the default language when hiding the language code and using date and name permalinks
+* Bug correction: only one wpml-config.xml file is parsed
+
+= 1.0.2 (2013-02-26) =
+
+* Add the possibility to query comments by language
+* Add the possibility not to set a cookie by defining PLL_COOKIE to false (Polylang may not work as expected on some pages)
+* Now a returning visitor is redirected to its preferred language when visiting the front page in the default language
+* Add compatibility with the plugin Custom field template (copy and synchronize custom fields)
+* Improve compatibility with plugins or themes which overwrite columns in posts list table
+* Add the filter 'pll_get_flag'
+* Add support of 'icl_unregister_string' function from the WPML API
+* Bug correction: synchronizing custom fields breaks the plugin Advanced Custom Fields
+* Bug correction: 'pll_default_language' broken
+* Bug correction: rewrite rules are not flushed when re-activating the plugin
+* Bug correction: feed urls are not correctly escaped when using default permalinks
+* Bug correction: notice Undefined index: media_support
+* Bug correction: custom post types and taxonomies set in wpml-config.xml are not hidden
+* Bug correction: get_terms cannot query multiple languages
+* Bug correction: 'icl_register_string' is now persistant as in WPML (fixes Nextgen gallery translations which were not working)
+
+= 1.0.1 (2013-01-28) =
+
+* Add Swedish translation contributed by [matsii](http://wordpress.org/support/profile/matsii)
+* Add 2 new API functions : 'pll_is_translated_post_type' and 'pll_is_translated_taxonomy'
+* Bug correction: when using a static front page, the posts page is not filtered by language (introduced in 1.0)
+* Bug correction: disable translation for hard coded menu as it creates more problems than it solves (introduced in 1.0)
+
+= 1.0 (2013-01-24) =
+
+* Add Hungarian translation contributed by Csaba Erdei
+* Add Norwegian translation contributed by [Tom Boersma](http://www.oransje.com/)
+* Add Slovak translation contributed by [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/user-reviews/)
+* Code cleaning -> remove compatibility with versions older than 0.8
+* Add search in the string translations list table
+* Add options to better control the synchronization of various metas for posts
+* It is now possible to synchronize sticky posts and publication dates
+* Add option to disable the multilingual support of media
+* Add options to better control the multilingual capability of custom post types and taxonomies
+* Better integration with new media management in WP 3.5
+* Improve menu translation for themes which register a theme location but don't use it in wp_nav_menu (hard coded menu)
+* Add the pll_preferred_language filter allowing plugins to modify the language set by browser preferences detection
+* Add support of the WPML config file
+* Add support of 'icl_get_languages' and 'icl_link_to_element' functions from the WPML API
+* Add compatibility with YARPP and improve compatibility with WordPress SEO
+* Change cookie name which conflicts with Quick cache and allow users to overwrite it by defining the constant PLL_COOKIE
+* Bug correction: again the canonical redirection
+* Bug correction: the languages are not correctly displayed after they have been modified using quick edit
+* Bug correction: undefined index notice when saving strings translation when the admin language filter is active
+* Bug correction: rewrite rules are not correctly flushed when adding / deleting a language (introduced in 0.9.2)
+* Bug correction: the list of pages is displayed when a static font page translation is not translated (now replaced by the list of posts)
+* Bug correction: permalinks are not modified when doing cron and the language code is added to all urls
+* Bug correction: creating a new term with the same name as a language may modify the language code (slug)
+
+= 0.9.8 (2012-12-05) =
+
+* Bug correction: ajax on frontend does not work when adding the language code to all urls
+* Bug correction: search forms using the get_search_form filter do not work
+
+= 0.9.7 (2012-12-04) =
+
+* Bug correction: the admin language filter does filter non translatable post types
+* Bug correction: again the canonical redirection
+* Bug correction: fatal error when Polylang is used together with 'Author Avatars List'
+* Bug correction: widget titles uselessly appear in the strings translations table when the widget is set for only one language
+* Tests done with WordPress 3.5 RC3 and Twenty Twelve
+
+= 0.9.6 (2012-11-26) =
+
+* It is now possible to query the terms by language using the WordPress function 'get_terms'
+* Bug correction: search for empty string in default language displays posts in all languages when hiding the URL language information for default language
+* Bug correction: completely reworked the canonical redirection introduced in 0.9.5 which created more problems than it solved
+* Bug correction: ajax for media translations does not work
+* Started tests with WordPress 3.5 RC1 and Twenty Twelve
+
+= 0.9.5 (2012-11-13) =
+
+* The user can now choose the number of languages and strings translations to display
+* Add compatibility with the 'icl_object_id' function and ICL_LANGUAGE_CODE and ICL_LANGUAGE_NAME constants from the WPML API
+* Add 17 languages to the predefined list (automatic download and update of language files won't work)
+* Bug correction: post preview does not work when adding the language code to all urls
+* Bug correction: redirect to front page in default language when posting a comment on static front page
+* Bug correction: impossible to create terms with the same name in different languages
+* Bug correction: query string added by other plugins is erased when adding the language code to all urls
+* Bug correction: redirect erase 'POST' variables on homepage when adding the language code to all urls
+* Bug correction: English (en_US) loads rtl style when using a localized WordPress package with an rtl language
+* Bug correction: on some installation strings translations do not work with some special characters
+* Bug correction: incoming links are not redirected to canonical url when adding the language code to all urls and hiding the code for the default language
+* Bug correction: search form does not work in non default language when using permalinks without trailing slash
+
+= 0.9.4 (2012-10-23) =
+
+* Add Afrikaans translation contributed by [Kobus Joubert](http://translate3d.com/)
+* Add Belarusian translation contributed by [Alexander Markevitch](http://fourfeathers.by/)
+* Add Afrikaans (af) and Belarusian (be_BY) to predefined languages list (automatic download and update of language files won't work)
+* Add the possibility to translate the date format and time format
+* Add compatibility with the 'icl_get_home_url' function from the WPML API
+* Bug correction: still some issues with string translations
+* Bug correction: search is not filtered by the (default) language when the language is set by content and the language code is hidden for the default language
+* Bug correction: posts & pages preview urls are broken when adding the language code to all urls
+* Bug correction: automatically added new top-level pages to menus are not filtered by language
+* Bug correction: the admin language filter messes the categories languages when editing a post and the parent dropdown list when editing a category
+* Bug correction: search form does not work when using a static front page (introduced in 0.9.2)
+* Bug correction: can't set languages for categories and post tags on blogs created after polylang has been activated at network level
+* Bug correction: menus don't work with catch box theme ('has_nav_menu' not correctly filtered)
+
+= 0.9.3 (2012-10-08) =
+
+* Add Bulgarian translation contributed by [pavelsof](http://wordpress.org/support/profile/pavelsof)
+* Add compatibility with WPML API for strings translations
+* Bug correction: dates are not translated (introduced in 0.9.2)
+* Bug correction: the language is lost when keeping - No change - for language in bulk edit
+* Bug correction: categories and tags are duplicate (when default language is set automatically to existing content and categories and tags share the same name)
+
+= 0.9.2 (2012-09-30) =
+
+* Support new WordPress (WP 3.5+) convention for js and css files naming
+* Improve performance, mainly on frontend
+* Bug correction: the category language is not set when creating it in the post editor (introduced in 0.9)
+* Bug correction: unable to add a query string when using a static front page
+* Bug correction: ajax tag suggestion in "edit post" conflicts with the admin content language filter
+* Bug correction: ugly notices when trying to access a static front page which has not been translated
+* Bug correction: the language code is added to custom post types and taxonomies permalinks even if they are not translatable
+* Bug correction: some arrays in wp_locale mix English and other language
+* Bug correction: the media language is not correctly set when uploading from post if the post has not been saved after choosing the language
+
+= 0.9.1 (2012-09-20) =
+
+* Add Finnish translation contributed by [Jani Alha](http://www.wysiwyg.fi)
+* Bug correction: improve the robustness of the admin content language filter
+* Bug correction: the language switcher displays languages which have no posts or pages (introduced in 0.9)
+* Bug correction: wrong default language when adding a new media
+* Bug correction: the dropdown language switcher does not switch language when there is no post translation
+* Bug correction: issue with translations when using category quick edit
+* Bug correction: home redirects to 404 when combining static front page + force_lang = 1 + hide_default = 0
+
+= 0.9 (2012-09-12) =
+
+* Add Turkish translation contributed by [darchws](http://darch.ws/)
+* Add media translation support
+* Add a persistant content language filter on admin side (WP 3.2+ required)
+* Add biographical info translation
+* Add multiline support for string translations
+* Add the possibility to clean the strings translation database
+* Add quick edit and bulk edit support for posts and pages
+* Add quick edit support for categories and tags
+* The language is now loaded with 'setup_theme' action instead of 'wp' action when always adding language information url
+* Search form now does use javascript only for searchform.php when pretty permalinks are not used
+* Add the option PLL_SEARCH_FORM_JS to disable the js code used to modify the search form
+* Suppress the option PLL_SYNC, replaced by an option in the language settings ui
+* Suppress the PLL_DISPLAY_ALL option
+* Suppress the template tag 'the_languages' (replaced by 'pll_the_languages' since v0.5)
+* Suppress the function 'pll_is_front_page' (useless since 0.8.2)
+* Bug correction: the browser language is sometimes not correctly detected by Android
+* Bug correction: the rtl text direction is not correct when editing an existing language
+* Bug correction: rss feed does not work if translated site title or tagline contains special characters
+* Bug correction: post types and taxonomies labels are not translated on frontend
+* Bug correction: the filter 'pll_copy_post_metas' does not work for metas with multiple values
+* Bug correction: translations table for post and terms are uselessly serialized two times
+* Bug correction: attempt to suppress conflict with themes which hardcode the name of nav menus (but do define a theme location)
+* Bug correction: homepage displays all posts when the front page displays a static page and no page is selected for front page (but one is selected for posts page)
+* Bug correction: widgets disappear when Polylang is enabled
+
+= 0.8.10 (2012-08-06) =
+
+* Add Lithuanian (lt_LT) to predefined languages list (automatic download and update of language files won't work)
+* Add Lithuanian translation contributed by [Naglis Jonaitis](http://najo.lt/)
+* Bug correction: empty string translation issue
+* Bug correction: 'wp_list_pages' does not filter custom post types
+* Bug correction: warning if posts are queried before the action 'wp_loaded' has been fired
+* Bug correction: notice in twentyten when resquesting a date archive with no posts
+
+= 0.8.9 (2012-07-20) =
+
+* Add Portuguese translation contributed by [Vitor Carvalho](http://vcarvalho.com/)
+
+= 0.8.8 (2012-07-18) =
+
+* Validation improvement thanks to kg69design
+* Bug correction: custom post types rewrite rules are broken when registered with query_var=>false
+* Bug correction: user admin language not deleted when uninstalling the plugin
+* Bug correction: pll_current_language('name') returns locale instead of language name
+* Bug correction: ajax on frontend does not work
+* Bug correction: homepage pagination broken when redirecting the language page to a static front page
+* Bug correction: taxonomies conflicts on custom post types
+* Bug correction: the admin language is not updated when edited by other users
+
+= 0.8.7 (2012-06-10) =
+
+* Add the possibility to load Polylang API for ajax requests on frontend
+* Bug correction: search form is broken when using a static front page
+* Bug correction: admin bar search does not work
+* Tests done with WordPress 3.4 RC2
+
+= 0.8.6 (2012-05-23) =
+
+* Add the possibility to use a local config file to set options
+* Improve robustness (less PHP notices)
+* Bug correction: Menus not showing in preview mode
+* Bug correction: fatal error when customizing a theme in WP 3.4 beta 4
+* Bug correction: second page of search results returns 404 when using pretty permalinks
+
+= 0.8.5 (2012-05-14) =
+
+* Bug correction : sites using static front page are messed in v0.8.4
+
+= 0.8.4 (2012-05-13) =
+
+* Add a new argument 'post_id' to the function pll_the_languages to display posts translations within the loop
+* Bug correction: every posts in every languages are shown on the homepage when requesting the wrong one with or without 'www.'
+* Bug correction: every posts in every languages are shown when requesting /?p=string
+* Bug correction: the language is not correctly set for wp-signup.php and wp-activate.php
+* Bug correction: wrong home links when using permalinks with front with WP 3.3 and older
+* Bug correction: wrong redirection after posting a comment when adding the language information to all urls
+* Bug correction: term language may be lost in some situations
+* Bug correction: post language is set to default if updated outside the edit post page
+* Bug correction: javascript error in WP 3.1
+* Bug correction: can't toggle visibility of tags metabox in edit post panel
+* Tests done with WordPress 3.4 beta 4
+
+= 0.8.3 (2012-04-10) =
+
+* Add Danish translation contributed by [Compute](http://wordpress.org/support/profile/compute)
+* Add Spanish translation contributed by Curro
+* Add the possibility to add a content in a different language than the current one by setting explicitely the lang parameter in the secondary query
+* Add support of PATHINFO permalinks
+* Bug correction: secondary queries not correctly filtered by language
+* Bug correction: wrong archives links when using permalinks with front
+* Bug correction: wrong homepage link when keeping 'language' in permalinks with front
+* Bug correction: flush_rewrite_rules notice when setting up a static front page (introduced in 0.8.2)
+* Bug correction: every posts in every languages are shown when hitting the homepage with a query string unknown to WP (thanks to Gonçalo Peres)
+* Bug correction: every posts in every languages are shown on the homepage when PHP adds index.php to the url
+* Tests done with WordPress 3.4 beta 1
+
+
+= 0.8.2 (2012-03-20) =
+
+* Add Italian translation contributed by [Luca Barbetti](http://wordpress.org/support/profile/lucabarbetti)
+* Improve performance on admin side
+* Comment status and ping status are now copied when adding a new translation
+* Deprecated API function 'pll_is_front_page' as it is now useless
+* Bug correction: Wrong translation url for taxonomies when adding the language information to all urls
+* Bug correction: "translation" of search page does not work if the site is only made of pages
+* Bug correction: wrong language permalink structure introduced in 0.8.1
+* Bug correction: wrong language set when clicking on "add new" translation in edit category and edit tags panels
+* Bug correction: site does not display if no languages are set
+* Bug correction: get_author_posts_url is 404
+* Bug correction: homepage is 404 when using a static front page and adding the language information to all urls
+
+= 0.8.1 (2012-03-11) =
+
+* Add Latvian translation contributed by [@AndyDeGroo](http://twitter.com/AndyDeGroo)
+* It is now possible to synchronize multiple values for custom fields
+* Add new API function pll_current_language
+* Add the pll_rewrite_rules filter allowing plugins to filter rewrite rules by language
+* WP 3.4 preparation: disable the menu section in the customize theme admin panel (unusable with Polylang)
+* Bug correction: removing 'language' in permalinks does not work in WP 3.4 alpha
+* Bug correction: problems with custom post type archives when 'has_archive' is set (thanks to AndyDeGroo)
+* Bug correction: 404 error when combining %postname% permastructure with "Add language information to all URL" option
+* Bug correction: translated custom strings are duplicated if registered several times
+* Bug correction: queries with an array of post types are not correctly filtered
+* Bug correction: wp-login.php always in English
+
+= 0.8 (2012-02-29) =
+
+* Sticky posts are now filtered by language
+* It is now possible to use the language page as home page
+* Add an "About Polylang" metabox on the languages admin page
+* Add the pll_the_languages filter allowing to filter the whole output of the language switcher
+* Add a new argument 'display_names_as' to the function pll_the_languages
+* Add pll_get_post_types & pll_get_taxonomies filters allowing to enable / disable the language filter for post types & taxonomies
+* Add ckb to predefined languages list
+* Completely reworked the string translation storage in the database
+* Some performance improvements on admin side
+* Improve compatibility with other plugins broken by the home url filter
+* Add an option to disable the home url filter
+* Add an option to disable synchronization of metas between translations
+* Bug correction: body class 'home' is not set on translated homepage
+* Bug correction: robots.txt is broken when adding the language code to all urls (including default language)
+* Bug correction: bad name for the Czech flag
+* Bug correction: bad language information in rss feed for WP < 3.4
+* Bug correction: signup broken on multisite
+* Bug correction: the translation url is set to self when using a static front page and no page for posts and there is no translation
+* Bug correction: problems with custom post type archive titles
+* Bug correction: problems with custom post type if rewrite slug is different from post_type (thanks to AndyDeGroo)
+* Bug correction: quick edit still breaks translation linking of pages (thanks to AndyDeGroo)
+* Bug correction: bad rewrite rules for feeds (introduced in 0.7.2)
+* Bug correction: the order is not saved when creating a language
+* Bug correction: the categories list is not updated when adding a new category (ajax broken)
+
+= 0.7.2 (2012-02-15) =
+
+* Add Polish translation contributed by [Peter Paciorkiewicz](http://www.paciorkiewicz.pl)
+* Add 5 new languages to predefined list
+* completely reworked rewrite rules
+* WP 3.4 preparation: add new WordPress languages files to download when creating a new language
+* Bug correction: custom nav menus do not work in Artisteer generated themes
+* Bug correction: having a single language causes multiple warnings while saving post/page.
+* Bug correction: custom nav menu broken on archives pages
+* Bug correction: the language switcher does not link to translated post type archive when using pretty permalinks
+* Bug correction: the tags are not saved in the right language when translated tags have the same name
+* Bug correction: bad link in post preview when adding language code to all urls
+* Bug correction: feed not filtered by language when adding language code to all urls
+* Bug correction: duplicate canonical link when used together with WordPress SEO by Yoast
+* Bug correction: the all posts admin page is messed if another plugin adds a column
+* Bug correction: 404 error on static front page when adding language code to all urls (including default language)
+
+= 0.7.1 (2012-02-06) =
+
+* Allow using 3 characters languages codes (ISO 639-2 or 639-3)
+* The predefined languages dropdown list now displays the locale to help differentiate some languages
+* Add 5 new languages to predefined list
+* Bug correction: the filter 'pll_copy_post_metas' does not work
+* Bug correction: impossible to add a tag in the edit post panel
+* Bug correction: rewrite rules not correct
+* Bug correction: cache issue with css and js files
+
+= 0.7 (2012-01-30) =
+
+* Add Hebrew translation contributed by [ArielK](http://www.arielk.net)
+* Add support for RTL languages for both frontend and admin
+* Twenty Ten and Twenty Eleven languages files are now automatically downloaded when creating a new langage
+* Improve filtering tags by language in the edit post panel
+* Category parent dropdown list is now filtered by language
+* Category parents are now synchronized between translations
+* Add the possibility to have the language information in all URL
+* Add support for post formats
+* Add option allowing not to show the current language in the language switcher (for both menu and widget)
+* Add a title attribute (and the possibility to personalize it with a filter) to flags
+* pll_get_post and pll_get_term second parameter is now optional and defaults to current language
+* Add pll_the_language_link filter allowing to filter translation links outputed by the language switcher
+* The option PLL_DISPLAY_ALL is no longer supported
+* Bug correction: Autosave reset to default language
+* Bug correction: blog info not translated in feeds
+* Bug correction: post comments feed always in default language
+* Bug correction: undefined index notice when setting up a custom menu widget
+* Bug correction: rewrite rules are not correctly reset when deactivating the plugin
+* Bug correction: is_home not correctly set on pages 2, 3...
+* Bug correction: avoid naming conflicts (in sql queries) with other themes / plugins
+* Bug correction: bad language detection and url rewriting of custom post types archives
+
+= 0.6.1 (2012-01-12) =
+
+* Add Dutch translation contributed by [AlbertGn](http://wordpress.org/support/profile/albertgn)
+* Disable everything except the languages management panel while no language has been created
+* Bug correction: can't have the same featured image in translated posts
+* Bug correction: parent page dropdown does appear only after the page has been saved
+* Bug correction: archives widget not working anymore
+* Bug correction: string translations does not work for WP < 3.3
+* Bug correction: fix fatal error in string translations caused by widgets using the old API
+* Bug correction: the strings translation panel is unable to translate strings with special characters
+* Bug correction: Polylang "is_front_page" returns true on archives pages
+
+= 0.6 (2012-01-07) =
+
+* Add Greek translation contributed by [theodotos](http://www.ubuntucy.org)
+* WordPress languages files are now automatically downloaded when creating a new langage (and updated when updating WordPress)
+* Add the possibility to change the order of the languages in the language switcher
+* Add the possibility to translate the site title, tagline and widgets titles
+* Categories, post tags, featured image, page parent, page template and menu order are now copied when adding a new translation
+* Translations are now accessibles in the "Posts", "Pages", "Categories" and "Post tags" admin panels
+* Improve the dropdown language switcher widget (sends now to translated page or home page based on options)
+* Move custom flags from polylang/local_flags to wp_content/polylang
+* Add two options to "pll_the_languages" ('hide_if_no_translation' and 'hide_current'). *The function does not output ul tag anymore*
+* Improve API
+* Bug correction: Twenty eleven custom Header problem with v0.5.1
+* Bug correction: front-page.php not loaded for translated front page
+
+= 0.5.1 (2011-12-18) =
+
+* Improved German translation contributed by [Christian Ries](http://www.singbyfoot.lu)
+* Bug correction: translated homepage not recognized as home page when it displays posts
+* Bug correction: predefined language list does not work on IE8
+* Bug correction: on some installations, "Add New" post doesn't keep intended language
+* Bug correction: fatal error when Polylang is used together with the plugin Tabbed Widgets
+* Bug correction: language Switcher points sometimes to wrong places
+
+= 0.5 (2011-12-07) =
+
+* Add multisite support
+* Rework the Polylang admin panel. There is now a set of predefined languages
+* Improve categories and tags language filter in the edit post panel
+* Categories and tags created in the edit post panel are now created with the same language as the post
+* The language switcher can now force the link to the front page instead of the translated page
+* The nav menus can now display a language switcher
+* Improved performance
+* Optimized the calendar widget (less code and sql queries executed)
+* Added the possibility to display posts and terms with no language set (see the documentation to know how to enable this functionnality)
+* Started the creation of a small API for theme and plugin programmers
+* Bug correction: when using a static front page, the page for posts does not work when using the default permalink settings
+* Bug correction: the search form does not work if a static front page is used
+* Bug correction: quick edit breaks translations
+* Bug correction: categories and post tags translations don't work for more than 2 languages
+* Bug correction: the output of wp_page_menu is not correct for non default languages
+
+= 0.4.4 (2011-11-28) =
+
+* Bug correction: When using a static front page, the translated home page displays posts instead of the translated page
+* Bug correction: Automatic language setting of existing categories and post tags does not work correctly
+
+= 0.4.3 (2011-11-19) =
+
+* Add Russian translation contributed by [yoyurec](http://yoyurec.in.ua)
+* Bug correction: impossible to suppress the language name in the language switcher widget settings
+* Bug correction: post's page does not work when using a static front page
+* Bug correction: flags in local_flags directory are removed after an automatic upgrade (now works for an upgrade from 0.4.3+ to a higher version)
+* Bug correction: switching to default language displays a 404 Error when hiding the default language in url and displaying the language switcher as dropdown
+* Other minor bug corrections
+* Tests done with WordPress 3.3 beta 3
+
+= 0.4.2 (2011-11-16) =
+
+* Bug correction: language settings page is broken in v0.4.1
+
+= 0.4.1 (2011-11-16) =
+
+* Bug correction: flags shows even when you set doesn't to show
+* Bug correction: custom taxonomies do not work
+* Bug correction: some users get the fatal error: call to undefined function wp_get_current_user() in /wp-includes/user.php on line 227
+
+= 0.4 (2011-11-10) =
+
+* Add a documentation (in English only)
+* Add the possibility to hide the url language information for the default language
+* Add the possibility to set the admin language in the user profile
+* Add the possibilty to fill existing posts, pages, categories & tags with the default language
+* Add support for custom post types and custom taxonomies
+* Add the possibility to display flags in the language switcher
+* Add CSS classes to customize rendering of the language switcher
+* Add the possibility to display the language switcher as a dropdown list
+* Add support for calendar widget
+* Improve performance: less sql queries
+* Improve data validation when creating or updating languages
+* Bug correction: 'wp_list_pages' page order is ignored when the plugin is enabled
+* Bug correction: when using 'edit' or 'add new' (translation) for posts, the categories appear in the wrong language
+* Bug correction: pages are not included in language post count
+* Bug correction: the language switcher does not display languages if there are only pages
+* Bug correction: the widget filter does not allow to come back to 'all languages' once a language has been set
+* Other minor bug corrections
+
+= 0.3.2 (2011-10-20) =
+
+* Bug correction: authors pages are not filtered by language
+* Bug correction: language pages use the archive template
+* Bug correction: database error for comments on posts and pages
+* Bug correction: "Add new" translation for pages creates a post instead of a page
+* Bug correction: the search query does not look into pages
+
+= 0.3.1 (2011-10-16) =
+
+* Bug correction: the widget settings cannot be saved when activating Polylang
+* Bug correction: the archives widget does not display any links
+* Bug correction: ajax form for translations not working in the 'Categories' and 'Post tags' admin panels
+
+= 0.3 (2011-10-07) =
+
+* Add language filter for widgets
+* Improved performance for filtering pages by language
+* Improved security
+* Minor bug correction with versions management
+
+= 0.2 (2011-10-05) =
+
+* Add language filter for nav menus
+* Add German translation
+* Add language filter for recent comments
+* Add ajax to term edit form
+* Add ajax to post metabox
+* Improved performance for filtering terms by language
+* Bugs correction
+
+= 0.1 (2011-09-22) =
+* Initial release
+
diff --git a/pole-sbv-content/plugins/polylang/css/admin.css b/pole-sbv-content/plugins/polylang/css/admin.css
new file mode 100644
index 00000000..3e5c3167
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/css/admin.css
@@ -0,0 +1,400 @@
+/* languages admin panel */
+#add-lang select {
+ width: 95%;
+}
+
+.column-locale,
+.languages .column-slug {
+ width : 15%
+}
+
+.column-default_lang {
+ width : 5%;
+}
+
+.column-term_group,
+.column-flag, .column-count {
+ width : 10%;
+}
+
+.icon-default-lang:before {
+ font-family: 'dashicons';
+ content: "\f155";
+}
+
+.form-field input[type="radio"] {
+ width: auto;
+ margin-right: 2px;
+}
+
+/* about Polylang metabox */
+#pll-about-box p,
+#pll-recommended p {
+ text-align: justify;
+}
+
+#pll-about-box input {
+ margin: 0;
+ padding: 0;
+ float: right;
+}
+
+/* strings translation table */
+.stringstranslations .column-name,
+.stringstranslations .column-context {
+ width: 10%;
+}
+
+.stringstranslations .column-string {
+ width: 33%;
+}
+
+.translation label {
+ display: inline-block;
+ width: 23%;
+ vertical-align: top;
+}
+
+.translation input,
+.translation textarea {
+ width: 72%;
+}
+
+/* settings */
+.pll-settings {
+ margin-top: 20px;
+}
+
+.pll-settings .plugin-title {
+ width: 25%;
+}
+
+#wpbody-content .pll-settings .pll-configure tr {
+ display: table-row;
+}
+
+#wpbody-content .pll-settings .pll-configure td {
+ display: table-cell;
+}
+
+#wpbody-content .pll-settings .pll-configure > td {
+ padding: 20px 20px 20px 40px;
+}
+
+.pll-configure legend {
+ font-size: 14px;
+ font-weight: 600;
+ margin-bottom: 0.5em;
+}
+
+.pll-configure td .description {
+ margin-top: 2px;
+ margin-bottom: 0.5em;
+}
+
+.pll-configure p.submit {
+ margin-top: 20px;
+}
+
+.pll-configure .button {
+ margin-right: 20px;
+}
+
+.pll-configure fieldset {
+ margin-bottom: 1.5em;
+}
+
+.pll-inline-block-list {
+ margin: 0;
+}
+
+.pll-inline-block-list li {
+ display: inline-block;
+ margin: 0;
+ width: 250px;
+}
+
+/* settings URL modifications */
+#pll-domains-table td {
+ padding: 2px 2px 2px 1.5em;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ border: none;
+}
+
+.pll-settings-url-col {
+ display: inline-block;
+ width: 49%;
+ vertical-align: top;
+}
+
+/* settings Activation keys */
+#pll-licenses-table td {
+ vertical-align: top;
+}
+
+#pll-licenses-table label {
+ font-size: 1em;
+ font-weight: 600;
+}
+
+.pll-configure .pll-deactivate-license {
+ margin: 0 0 0 20px;
+}
+
+/* language columns in edit.php and edit-tags.php */
+th[class*='column-language_'],
+td[class*='column-language_'] {
+ width: 1.5em;
+}
+
+/* Text direcction in post.php and edit-tags.php */
+.pll-dir-rtl textarea,
+.pll-dir-rtl input[type="text"] {
+ direction: rtl;
+}
+
+.pll-dir-ltr textarea,
+.pll-dir-ltr input[type="text"] {
+ direction: ltr;
+}
+
+.pll-dir-ltr .tr_lang,
+.pll-dir-rtl .tr_lang {
+ direction: inherit;
+}
+
+/* languages metabox in post.php */
+#post-translations p {
+ float: left;
+}
+
+#post-translations table {
+ table-layout: fixed;
+ width: 100%;
+ clear: both;
+}
+
+#post-translations a {
+ text-decoration: none;
+}
+
+#post-translations .pll-language-column,
+#post-translations .pll-column-icon {
+ width: 20px;
+}
+
+#post-translations .tr_lang {
+ width: 100%;
+}
+
+#post-translations td {
+ padding: 2px;
+}
+
+#post-translations .spinner,
+#term-translations .spinner {
+ float: none;
+ margin: 0;
+ background-position: center;
+ width: auto;
+}
+
+.pll-column-icon {
+ text-align: center;
+}
+
+#select-post-language .pll-select-flag {
+ padding: 4px;
+ margin-right: 32px;
+}
+
+/* specific cases for media */
+#select-media-language .pll-select-flag {
+ padding: 4px;
+ margin-right: 10px;
+}
+
+.pll-media-edit-column {
+ float: right;
+}
+
+/* language and translations in edit-tags.php */
+.pll-translation-flag { /* also for media */
+ margin-right: 14px;
+}
+
+#select-add-term-language .pll-select-flag {
+ padding: 11px;
+ margin-right: 13px;
+}
+
+#select-edit-term-language .pll-select-flag {
+ padding: 11px;
+ margin-right: 4px;
+}
+
+#term-translations p {
+ /* same style as label */
+ font-size: 12px;
+ font-style: normal;
+ padding: 2px;
+ color: #23282d;
+}
+
+#add-term-translations,
+#edit-term-translations {
+ width: 95%;
+}
+
+#term-translations .pll-language-column {
+ line-height: 28px;
+ width: 20%;
+}
+
+#term-translations .pll-edit-column,
+#add-term-translations .pll-language-column {
+ width: 20px;
+}
+
+#edit-term-translations .pll-language-column {
+ padding: 15px 10px;
+ font-weight: normal;
+}
+
+/* icon fonts */
+.pll_icon_tick:before {
+ content: "\f147";
+}
+.pll_icon_add:before {
+ content: "\f132";
+}
+.pll_icon_edit:before {
+ content: "\f464";
+}
+
+[class^="pll_icon_"] {
+ font: 20px/1 'dashicons';
+ vertical-align: middle;
+}
+
+/* admin bar */
+#wpadminbar #wp-admin-bar-languages .ab-item img {
+ margin: 0 8px 0 2px;
+}
+
+#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon {
+ float: none;
+ top: 4px;
+}
+
+#wpadminbar #wp-admin-bar-languages .ab-icon:before {
+ content: "\f326";
+ top: 1px;
+}
+
+@media screen and ( max-width: 782px ) {
+ /* settings */
+ #wpbody-content .pll-settings .pll-configure > td {
+ padding: 20px;
+ }
+
+ #wpbody-content .pll-settings #cb {
+ padding: 20px 9px;
+ }
+
+ /* settings URL modifications */
+ .pll-inline-block {
+ width: auto;
+ }
+
+ .pll-settings-url-col {
+ display: block;
+ width: 100%;
+ }
+
+ /* settings licenses */
+ #wpbody-content .pll-settings #pll-licenses-table td {
+ display: block;
+ }
+
+ .pll-configure .pll-deactivate-license {
+ margin: 10px 0 5px;
+ }
+
+ /* strings translations table */
+ .stringstranslations .column-context,
+ .stringstranslations .column-name {
+ display: none; /* backward compatibility WP < 4.3 */
+ }
+
+ .translation label {
+ display: block;
+ width: 95%;
+ padding-left: 0;
+ }
+
+ .translation input {
+ width: 95%;
+ }
+
+ /* hide selected language flag and translations language name */
+ #select-add-term-language .pll-select-flag,
+ #select-edit-term-language .pll-select-flag,
+ #edit-term-translations .pll-language-name {
+ display: none;
+ }
+
+ #edit-term-translations {
+ width: 100%;
+ }
+
+ #add-term-translations .pll-language-column {
+ line-height: 38px;
+ }
+
+ #edit-term-translations td {
+ padding: 8px 10px;
+ }
+
+ #edit-term-translations .pll-language-column,
+ #edit-term-translations .pll-edit-column {
+ width: 20px;
+ }
+
+ /* translations tables should be kept as table */
+ .term-translations .pll-language-column,
+ .term-translations .pll-edit-column,
+ .term-translations .pll-translation-column {
+ display: table-cell;
+ }
+
+ .term-translations .hidden {
+ display: none;
+ }
+
+ /* admin bar */
+ #wpadminbar #wp-admin-bar-languages {
+ display: block; /*shows our menu on mobile devices */
+ }
+
+ #wpadminbar #wp-admin-bar-languages > .ab-item {
+ width: 50px;
+ text-align: center;
+ }
+
+ #wpadminbar #wp-admin-bar-languages > .ab-item .ab-icon:before {
+ font: 32px/1 'dashicons';
+ top: -1px;
+ }
+
+ #wpadminbar #wp-admin-bar-languages > .ab-item img {
+ margin: 19px 0;
+ }
+
+ #wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon {
+ margin-right: 6px;
+ font-size: 20px !important;
+ line-height: 20px !important;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/css/admin.min.css b/pole-sbv-content/plugins/polylang/css/admin.min.css
new file mode 100644
index 00000000..bb5a7b37
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/css/admin.min.css
@@ -0,0 +1 @@
+#pll-licenses-table td,.translation label{vertical-align:top}#add-lang select{width:95%}.column-locale,.languages .column-slug{width:15%}.column-default_lang{width:5%}.column-count,.column-flag,.column-term_group{width:10%}.icon-default-lang:before{font-family:dashicons;content:"\f155"}.form-field input[type=radio]{width:auto;margin-right:2px}#pll-about-box p,#pll-recommended p{text-align:justify}#pll-about-box input{margin:0;padding:0;float:right}.stringstranslations .column-context,.stringstranslations .column-name{width:10%}.stringstranslations .column-string{width:33%}.translation label{display:inline-block;width:23%}.translation input,.translation textarea{width:72%}.pll-settings{margin-top:20px}.pll-settings .plugin-title{width:25%}#wpbody-content .pll-settings .pll-configure tr{display:table-row}#wpbody-content .pll-settings .pll-configure td{display:table-cell}#wpbody-content .pll-settings .pll-configure>td{padding:20px 20px 20px 40px}.pll-configure legend{font-size:14px;font-weight:600;margin-bottom:.5em}.pll-configure td .description{margin-top:2px;margin-bottom:.5em}.pll-configure p.submit{margin-top:20px}.pll-configure .button{margin-right:20px}.pll-configure fieldset{margin-bottom:1.5em}.pll-inline-block-list{margin:0}.pll-inline-block-list li{display:inline-block;margin:0;width:250px}#pll-domains-table td{padding:2px 2px 2px 1.5em;-webkit-box-shadow:none;box-shadow:none;border:none}.pll-settings-url-col{display:inline-block;width:49%;vertical-align:top}#pll-licenses-table label{font-size:1em;font-weight:600}.pll-configure .pll-deactivate-license{margin:0 0 0 20px}td[class*=column-language_],th[class*=column-language_]{width:1.5em}.pll-dir-rtl input[type=text],.pll-dir-rtl textarea{direction:rtl}.pll-dir-ltr input[type=text],.pll-dir-ltr textarea{direction:ltr}.pll-dir-ltr .tr_lang,.pll-dir-rtl .tr_lang{direction:inherit}#post-translations p{float:left}#post-translations table{table-layout:fixed;width:100%;clear:both}#post-translations a{text-decoration:none}#post-translations .pll-column-icon,#post-translations .pll-language-column{width:20px}#post-translations .tr_lang{width:100%}#post-translations td{padding:2px}#post-translations .spinner,#term-translations .spinner{float:none;margin:0;background-position:center;width:auto}.pll-column-icon{text-align:center}#select-post-language .pll-select-flag{padding:4px;margin-right:32px}#select-media-language .pll-select-flag{padding:4px;margin-right:10px}.pll-media-edit-column{float:right}.pll-translation-flag{margin-right:14px}#select-add-term-language .pll-select-flag{padding:11px;margin-right:13px}#select-edit-term-language .pll-select-flag{padding:11px;margin-right:4px}#term-translations p{font-size:12px;font-style:normal;padding:2px;color:#23282d}#add-term-translations,#edit-term-translations{width:95%}#term-translations .pll-language-column{line-height:28px;width:20%}#add-term-translations .pll-language-column,#term-translations .pll-edit-column{width:20px}#edit-term-translations .pll-language-column{padding:15px 10px;font-weight:400}.pll_icon_tick:before{content:"\f147"}.pll_icon_add:before{content:"\f132"}.pll_icon_edit:before{content:"\f464"}[class^=pll_icon_]{font:20px/1 dashicons;vertical-align:middle}#wpadminbar #wp-admin-bar-languages .ab-item img{margin:0 8px 0 2px}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{float:none;top:4px}#wpadminbar #wp-admin-bar-languages .ab-icon:before{content:"\f326";top:1px}@media screen and (max-width:782px){#wpbody-content .pll-settings .pll-configure>td{padding:20px}#wpbody-content .pll-settings #cb{padding:20px 9px}.pll-inline-block{width:auto}.pll-settings-url-col{display:block;width:100%}#wpbody-content .pll-settings #pll-licenses-table td{display:block}.pll-configure .pll-deactivate-license{margin:10px 0 5px}.stringstranslations .column-context,.stringstranslations .column-name{display:none}.translation label{display:block;width:95%;padding-left:0}.translation input{width:95%}#edit-term-translations .pll-language-name,#select-add-term-language .pll-select-flag,#select-edit-term-language .pll-select-flag{display:none}#edit-term-translations{width:100%}#add-term-translations .pll-language-column{line-height:38px}#edit-term-translations td{padding:8px 10px}#edit-term-translations .pll-edit-column,#edit-term-translations .pll-language-column{width:20px}.term-translations .pll-edit-column,.term-translations .pll-language-column,.term-translations .pll-translation-column{display:table-cell}.term-translations .hidden{display:none}#wpadminbar #wp-admin-bar-languages{display:block}#wpadminbar #wp-admin-bar-languages>.ab-item{width:50px;text-align:center}#wpadminbar #wp-admin-bar-languages>.ab-item .ab-icon:before{font:32px/1 dashicons;top:-1px}#wpadminbar #wp-admin-bar-languages>.ab-item img{margin:19px 0}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{margin-right:6px;font-size:20px!important;line-height:20px!important}}
diff --git a/pole-sbv-content/plugins/polylang/css/selectmenu.css b/pole-sbv-content/plugins/polylang/css/selectmenu.css
new file mode 100644
index 00000000..9eb29261
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/css/selectmenu.css
@@ -0,0 +1,140 @@
+/* Greatly modified version of the jquery-ui.css */
+
+.ui-widget-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.ui-menu {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ display: block;
+ outline: none;
+}
+
+.ui-menu .ui-menu {
+ position: absolute;
+}
+
+.ui-menu .ui-menu-item {
+ position: relative;
+ margin: 0;
+ padding: 3px 1em 3px .4em;
+ min-height: 0; /* support: IE7 */
+ /* support: IE10, see #8844 */
+ list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
+}
+
+/* icon support */
+.ui-menu-icons {
+ position: relative;
+}
+
+.ui-menu-icons .ui-menu-item {
+ padding-left: 2em;
+}
+
+/* left-aligned */
+.ui-selectmenu-text .ui-icon,
+.ui-menu .ui-icon {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: .2em;
+ margin: auto 0;
+}
+
+/* right-aligned */
+.ui-menu .ui-menu-icon {
+ left: auto;
+ right: 0;
+}
+
+.ui-selectmenu-menu {
+ padding: 0;
+ margin: 0;
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: none;
+}
+
+.ui-selectmenu-menu .ui-menu {
+ overflow: auto;
+ /* Support: IE7 */
+ overflow-x: hidden;
+ padding-bottom: 1px;
+}
+
+.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
+ font-size: 1em;
+ font-weight: bold;
+ line-height: 23px;
+ padding: 2px 0.4em;
+ margin: 0.5em 0 0 0;
+ height: auto;
+ border: 0;
+}
+
+.ui-selectmenu-open {
+ display: block;
+}
+
+.ui-selectmenu-button {
+ display: inline-block;
+ overflow: hidden;
+ position: relative;
+ text-decoration: none;
+}
+
+.ui-selectmenu-button span.ui-icon {
+ right: 0.5em;
+ left: auto;
+ margin-top: -10px;
+ position: absolute;
+ top: 50%;
+}
+
+.ui-selectmenu-button span.ui-selectmenu-text {
+ text-align: left;
+ padding: 0.4em 2.1em 0.4em 2em;
+ display: block;
+ line-height: 23px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.ui-widget-content,
+.ui-state-default,
+.ui-widget-content .ui-state-default,
+.ui-widget-header .ui-state-default {
+ background: #fff;
+ border: 1px solid #ddd;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
+ color: #32373c;
+}
+
+.ui-widget-content .ui-state-hover,
+.ui-widget-content .ui-state-focus {
+ background: #f5f5f5;
+}
+
+.ui-selectmenu-button.ui-state-focus {
+ border: 1px solid #5b9dd9;
+ box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
+}
+
+.ui-icon-triangle-1-s:before {
+ content: "\f140";
+ font: 20px/1 'dashicons';
+}
+
+.ui-widget-content {
+ max-height: 231px;
+ box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
+}
diff --git a/pole-sbv-content/plugins/polylang/css/selectmenu.min.css b/pole-sbv-content/plugins/polylang/css/selectmenu.min.css
new file mode 100644
index 00000000..5527ee05
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/css/selectmenu.min.css
@@ -0,0 +1 @@
+.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;min-height:0;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon,.ui-selectmenu-text .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:700;line-height:23px;padding:2px .4em;margin:.5em 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none}.ui-selectmenu-button span.ui-icon{right:.5em;left:auto;margin-top:-10px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:.4em 2.1em .4em 2em;display:block;line-height:23px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-state-default,.ui-widget-content,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{background:#fff;border:1px solid #ddd;box-shadow:0 1px 2px rgba(0,0,0,.07) inset;color:#32373c}.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover{background:#f5f5f5}.ui-selectmenu-button.ui-state-focus{border:1px solid #5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.ui-icon-triangle-1-s:before{content:"\f140";font:20px/1 dashicons}.ui-widget-content{max-height:231px;box-shadow:0 2px 6px rgba(100,100,100,.3)}
diff --git a/pole-sbv-content/plugins/polylang/flags/ad.png b/pole-sbv-content/plugins/polylang/flags/ad.png
new file mode 100644
index 00000000..625ca84f
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ad.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ae.png b/pole-sbv-content/plugins/polylang/flags/ae.png
new file mode 100644
index 00000000..ef3a1ecf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ae.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/af.png b/pole-sbv-content/plugins/polylang/flags/af.png
new file mode 100644
index 00000000..a4742e29
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/af.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ag.png b/pole-sbv-content/plugins/polylang/flags/ag.png
new file mode 100644
index 00000000..556d5504
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ag.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ai.png b/pole-sbv-content/plugins/polylang/flags/ai.png
new file mode 100644
index 00000000..74ed29d9
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ai.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/al.png b/pole-sbv-content/plugins/polylang/flags/al.png
new file mode 100644
index 00000000..92354cb6
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/al.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/am.png b/pole-sbv-content/plugins/polylang/flags/am.png
new file mode 100644
index 00000000..344a2a86
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/am.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/an.png b/pole-sbv-content/plugins/polylang/flags/an.png
new file mode 100644
index 00000000..633e4b89
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/an.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ao.png b/pole-sbv-content/plugins/polylang/flags/ao.png
new file mode 100644
index 00000000..bcbd1d6d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ao.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ar.png b/pole-sbv-content/plugins/polylang/flags/ar.png
new file mode 100644
index 00000000..e5ef8f1f
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ar.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/arab.png b/pole-sbv-content/plugins/polylang/flags/arab.png
new file mode 100644
index 00000000..365172ac
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/arab.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/as.png b/pole-sbv-content/plugins/polylang/flags/as.png
new file mode 100644
index 00000000..32f30e4c
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/as.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/at.png b/pole-sbv-content/plugins/polylang/flags/at.png
new file mode 100644
index 00000000..0f15f34f
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/at.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/au.png b/pole-sbv-content/plugins/polylang/flags/au.png
new file mode 100644
index 00000000..a01389a7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/au.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/aw.png b/pole-sbv-content/plugins/polylang/flags/aw.png
new file mode 100644
index 00000000..a3579c2d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/aw.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ax.png b/pole-sbv-content/plugins/polylang/flags/ax.png
new file mode 100644
index 00000000..1eea80a7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ax.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/az.png b/pole-sbv-content/plugins/polylang/flags/az.png
new file mode 100644
index 00000000..4ee9fe5c
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/az.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ba.png b/pole-sbv-content/plugins/polylang/flags/ba.png
new file mode 100644
index 00000000..c7749924
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ba.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/basque.png b/pole-sbv-content/plugins/polylang/flags/basque.png
new file mode 100644
index 00000000..cb2f25e1
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/basque.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bb.png b/pole-sbv-content/plugins/polylang/flags/bb.png
new file mode 100644
index 00000000..0df19c71
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bb.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bd.png b/pole-sbv-content/plugins/polylang/flags/bd.png
new file mode 100644
index 00000000..076a8bf8
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bd.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/be.png b/pole-sbv-content/plugins/polylang/flags/be.png
new file mode 100644
index 00000000..d86ebc80
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/be.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bf.png b/pole-sbv-content/plugins/polylang/flags/bf.png
new file mode 100644
index 00000000..ab5ce8fe
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bf.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bg.png b/pole-sbv-content/plugins/polylang/flags/bg.png
new file mode 100644
index 00000000..0469f060
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bh.png b/pole-sbv-content/plugins/polylang/flags/bh.png
new file mode 100644
index 00000000..ea8ce687
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bh.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bi.png b/pole-sbv-content/plugins/polylang/flags/bi.png
new file mode 100644
index 00000000..5cc2e30c
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bi.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bj.png b/pole-sbv-content/plugins/polylang/flags/bj.png
new file mode 100644
index 00000000..1cc8b458
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bj.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bm.png b/pole-sbv-content/plugins/polylang/flags/bm.png
new file mode 100644
index 00000000..c0c7aead
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bn.png b/pole-sbv-content/plugins/polylang/flags/bn.png
new file mode 100644
index 00000000..8fb09849
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bo.png b/pole-sbv-content/plugins/polylang/flags/bo.png
new file mode 100644
index 00000000..ce7ba522
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bo.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/br.png b/pole-sbv-content/plugins/polylang/flags/br.png
new file mode 100644
index 00000000..9b1a5538
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/br.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bs.png b/pole-sbv-content/plugins/polylang/flags/bs.png
new file mode 100644
index 00000000..639fa6cf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bs.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bt.png b/pole-sbv-content/plugins/polylang/flags/bt.png
new file mode 100644
index 00000000..1d512dff
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bt.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bw.png b/pole-sbv-content/plugins/polylang/flags/bw.png
new file mode 100644
index 00000000..fcb10394
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bw.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/by.png b/pole-sbv-content/plugins/polylang/flags/by.png
new file mode 100644
index 00000000..504774ec
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/by.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/bz.png b/pole-sbv-content/plugins/polylang/flags/bz.png
new file mode 100644
index 00000000..be63ee1c
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ca.png b/pole-sbv-content/plugins/polylang/flags/ca.png
new file mode 100644
index 00000000..1f204193
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ca.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/catalonia.png b/pole-sbv-content/plugins/polylang/flags/catalonia.png
new file mode 100644
index 00000000..5041e308
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/catalonia.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cc.png b/pole-sbv-content/plugins/polylang/flags/cc.png
new file mode 100644
index 00000000..aed3d3b4
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cc.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cd.png b/pole-sbv-content/plugins/polylang/flags/cd.png
new file mode 100644
index 00000000..5e489424
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cd.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cf.png b/pole-sbv-content/plugins/polylang/flags/cf.png
new file mode 100644
index 00000000..da687bdc
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cf.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cg.png b/pole-sbv-content/plugins/polylang/flags/cg.png
new file mode 100644
index 00000000..a859792e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ch.png b/pole-sbv-content/plugins/polylang/flags/ch.png
new file mode 100644
index 00000000..242ec01a
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ch.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ci.png b/pole-sbv-content/plugins/polylang/flags/ci.png
new file mode 100644
index 00000000..3f2c62eb
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ci.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ck.png b/pole-sbv-content/plugins/polylang/flags/ck.png
new file mode 100644
index 00000000..746d3d6f
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ck.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cl.png b/pole-sbv-content/plugins/polylang/flags/cl.png
new file mode 100644
index 00000000..29c6d61b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cl.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cm.png b/pole-sbv-content/plugins/polylang/flags/cm.png
new file mode 100644
index 00000000..f65c5bd5
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cn.png b/pole-sbv-content/plugins/polylang/flags/cn.png
new file mode 100644
index 00000000..89144146
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/co.png b/pole-sbv-content/plugins/polylang/flags/co.png
new file mode 100644
index 00000000..a118ff4a
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/co.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cr.png b/pole-sbv-content/plugins/polylang/flags/cr.png
new file mode 100644
index 00000000..c7a37317
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cu.png b/pole-sbv-content/plugins/polylang/flags/cu.png
new file mode 100644
index 00000000..083f1d61
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cu.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cv.png b/pole-sbv-content/plugins/polylang/flags/cv.png
new file mode 100644
index 00000000..a63f7eaf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cv.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cx.png b/pole-sbv-content/plugins/polylang/flags/cx.png
new file mode 100644
index 00000000..48e31adb
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cx.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cy.png b/pole-sbv-content/plugins/polylang/flags/cy.png
new file mode 100644
index 00000000..5b1ad6c0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cy.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/cz.png b/pole-sbv-content/plugins/polylang/flags/cz.png
new file mode 100644
index 00000000..c8403dd2
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/de.png b/pole-sbv-content/plugins/polylang/flags/de.png
new file mode 100644
index 00000000..ac4a9773
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/de.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/dj.png b/pole-sbv-content/plugins/polylang/flags/dj.png
new file mode 100644
index 00000000..582af364
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/dj.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/dk.png b/pole-sbv-content/plugins/polylang/flags/dk.png
new file mode 100644
index 00000000..e2993d3c
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/dk.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/dm.png b/pole-sbv-content/plugins/polylang/flags/dm.png
new file mode 100644
index 00000000..5fbffcba
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/dm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/do.png b/pole-sbv-content/plugins/polylang/flags/do.png
new file mode 100644
index 00000000..5a04932d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/do.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/dz.png b/pole-sbv-content/plugins/polylang/flags/dz.png
new file mode 100644
index 00000000..335c2391
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/dz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ec.png b/pole-sbv-content/plugins/polylang/flags/ec.png
new file mode 100644
index 00000000..0caa0b1e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ec.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ee.png b/pole-sbv-content/plugins/polylang/flags/ee.png
new file mode 100644
index 00000000..0c82efb7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ee.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/eg.png b/pole-sbv-content/plugins/polylang/flags/eg.png
new file mode 100644
index 00000000..8a3f7a10
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/eg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/eh.png b/pole-sbv-content/plugins/polylang/flags/eh.png
new file mode 100644
index 00000000..90a1195b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/eh.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/england.png b/pole-sbv-content/plugins/polylang/flags/england.png
new file mode 100644
index 00000000..3a7311d5
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/england.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/er.png b/pole-sbv-content/plugins/polylang/flags/er.png
new file mode 100644
index 00000000..13065ae9
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/er.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/es.png b/pole-sbv-content/plugins/polylang/flags/es.png
new file mode 100644
index 00000000..c2de2d71
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/es.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/esperanto.png b/pole-sbv-content/plugins/polylang/flags/esperanto.png
new file mode 100644
index 00000000..03a333e2
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/esperanto.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/et.png b/pole-sbv-content/plugins/polylang/flags/et.png
new file mode 100644
index 00000000..2e893fa0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/et.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/fi.png b/pole-sbv-content/plugins/polylang/flags/fi.png
new file mode 100644
index 00000000..14ec091b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fi.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/fj.png b/pole-sbv-content/plugins/polylang/flags/fj.png
new file mode 100644
index 00000000..cee99889
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fj.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/fk.png b/pole-sbv-content/plugins/polylang/flags/fk.png
new file mode 100644
index 00000000..ceaeb27d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fk.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/fm.png b/pole-sbv-content/plugins/polylang/flags/fm.png
new file mode 100644
index 00000000..066bb247
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/fo.png b/pole-sbv-content/plugins/polylang/flags/fo.png
new file mode 100644
index 00000000..cbceb809
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fo.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/fr.png b/pole-sbv-content/plugins/polylang/flags/fr.png
new file mode 100644
index 00000000..8332c4ec
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ga.png b/pole-sbv-content/plugins/polylang/flags/ga.png
new file mode 100644
index 00000000..0e0d4343
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ga.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/galicia.png b/pole-sbv-content/plugins/polylang/flags/galicia.png
new file mode 100644
index 00000000..64b0cbb4
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/galicia.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gb.png b/pole-sbv-content/plugins/polylang/flags/gb.png
new file mode 100644
index 00000000..ff701e19
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gb.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gd.png b/pole-sbv-content/plugins/polylang/flags/gd.png
new file mode 100644
index 00000000..9ab57f54
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gd.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ge.png b/pole-sbv-content/plugins/polylang/flags/ge.png
new file mode 100644
index 00000000..728d9707
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ge.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gh.png b/pole-sbv-content/plugins/polylang/flags/gh.png
new file mode 100644
index 00000000..4e2f8965
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gh.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gi.png b/pole-sbv-content/plugins/polylang/flags/gi.png
new file mode 100644
index 00000000..e76797f6
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gi.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gl.png b/pole-sbv-content/plugins/polylang/flags/gl.png
new file mode 100644
index 00000000..ef12a73b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gl.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gm.png b/pole-sbv-content/plugins/polylang/flags/gm.png
new file mode 100644
index 00000000..0720b667
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gn.png b/pole-sbv-content/plugins/polylang/flags/gn.png
new file mode 100644
index 00000000..ea660b01
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gp.png b/pole-sbv-content/plugins/polylang/flags/gp.png
new file mode 100644
index 00000000..dbb086d0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gp.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gq.png b/pole-sbv-content/plugins/polylang/flags/gq.png
new file mode 100644
index 00000000..ebe20a28
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gq.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gr.png b/pole-sbv-content/plugins/polylang/flags/gr.png
new file mode 100644
index 00000000..8651ade7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gs.png b/pole-sbv-content/plugins/polylang/flags/gs.png
new file mode 100644
index 00000000..7ef0bf59
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gs.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gt.png b/pole-sbv-content/plugins/polylang/flags/gt.png
new file mode 100644
index 00000000..c43a70d3
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gt.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gu.png b/pole-sbv-content/plugins/polylang/flags/gu.png
new file mode 100644
index 00000000..92f37c05
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gu.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gw.png b/pole-sbv-content/plugins/polylang/flags/gw.png
new file mode 100644
index 00000000..b37bcf06
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gw.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/gy.png b/pole-sbv-content/plugins/polylang/flags/gy.png
new file mode 100644
index 00000000..22cbe2f5
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gy.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/hk.png b/pole-sbv-content/plugins/polylang/flags/hk.png
new file mode 100644
index 00000000..d5c380ca
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hk.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/hm.png b/pole-sbv-content/plugins/polylang/flags/hm.png
new file mode 100644
index 00000000..a01389a7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/hn.png b/pole-sbv-content/plugins/polylang/flags/hn.png
new file mode 100644
index 00000000..96f83885
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/hr.png b/pole-sbv-content/plugins/polylang/flags/hr.png
new file mode 100644
index 00000000..696b5154
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ht.png b/pole-sbv-content/plugins/polylang/flags/ht.png
new file mode 100644
index 00000000..416052af
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ht.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/hu.png b/pole-sbv-content/plugins/polylang/flags/hu.png
new file mode 100644
index 00000000..7baafe44
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hu.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/id.png b/pole-sbv-content/plugins/polylang/flags/id.png
new file mode 100644
index 00000000..c6bc0faf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/id.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ie.png b/pole-sbv-content/plugins/polylang/flags/ie.png
new file mode 100644
index 00000000..26baa31e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ie.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/il.png b/pole-sbv-content/plugins/polylang/flags/il.png
new file mode 100644
index 00000000..2ca772d0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/il.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/in.png b/pole-sbv-content/plugins/polylang/flags/in.png
new file mode 100644
index 00000000..e4d7e81a
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/in.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/io.png b/pole-sbv-content/plugins/polylang/flags/io.png
new file mode 100644
index 00000000..3e74b6a3
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/io.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/iq.png b/pole-sbv-content/plugins/polylang/flags/iq.png
new file mode 100644
index 00000000..878a3514
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/iq.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ir.png b/pole-sbv-content/plugins/polylang/flags/ir.png
new file mode 100644
index 00000000..c5fd136a
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ir.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/is.png b/pole-sbv-content/plugins/polylang/flags/is.png
new file mode 100644
index 00000000..b8f6d0f0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/is.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/it.png b/pole-sbv-content/plugins/polylang/flags/it.png
new file mode 100644
index 00000000..89692f74
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/it.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/jm.png b/pole-sbv-content/plugins/polylang/flags/jm.png
new file mode 100644
index 00000000..7be119e0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/jm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/jo.png b/pole-sbv-content/plugins/polylang/flags/jo.png
new file mode 100644
index 00000000..11bd4972
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/jo.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/jp.png b/pole-sbv-content/plugins/polylang/flags/jp.png
new file mode 100644
index 00000000..325fbad3
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/jp.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ke.png b/pole-sbv-content/plugins/polylang/flags/ke.png
new file mode 100644
index 00000000..51879adf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ke.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/kg.png b/pole-sbv-content/plugins/polylang/flags/kg.png
new file mode 100644
index 00000000..0a818f67
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/kh.png b/pole-sbv-content/plugins/polylang/flags/kh.png
new file mode 100644
index 00000000..30f6bb1b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kh.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ki.png b/pole-sbv-content/plugins/polylang/flags/ki.png
new file mode 100644
index 00000000..2dcce4b3
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ki.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/km.png b/pole-sbv-content/plugins/polylang/flags/km.png
new file mode 100644
index 00000000..812b2f56
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/km.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/kn.png b/pole-sbv-content/plugins/polylang/flags/kn.png
new file mode 100644
index 00000000..febd5b48
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/kp.png b/pole-sbv-content/plugins/polylang/flags/kp.png
new file mode 100644
index 00000000..d3d509aa
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kp.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/kr.png b/pole-sbv-content/plugins/polylang/flags/kr.png
new file mode 100644
index 00000000..9c0a78eb
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/kurdistan.png b/pole-sbv-content/plugins/polylang/flags/kurdistan.png
new file mode 100644
index 00000000..02517b46
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kurdistan.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/kw.png b/pole-sbv-content/plugins/polylang/flags/kw.png
new file mode 100644
index 00000000..96546da3
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kw.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ky.png b/pole-sbv-content/plugins/polylang/flags/ky.png
new file mode 100644
index 00000000..15c5f8e4
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ky.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/kz.png b/pole-sbv-content/plugins/polylang/flags/kz.png
new file mode 100644
index 00000000..45a8c887
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/la.png b/pole-sbv-content/plugins/polylang/flags/la.png
new file mode 100644
index 00000000..e28acd01
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/la.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/lb.png b/pole-sbv-content/plugins/polylang/flags/lb.png
new file mode 100644
index 00000000..d0d452bf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lb.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/lc.png b/pole-sbv-content/plugins/polylang/flags/lc.png
new file mode 100644
index 00000000..a47d0655
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lc.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/li.png b/pole-sbv-content/plugins/polylang/flags/li.png
new file mode 100644
index 00000000..6469909c
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/li.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/lk.png b/pole-sbv-content/plugins/polylang/flags/lk.png
new file mode 100644
index 00000000..088aad6d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lk.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/lr.png b/pole-sbv-content/plugins/polylang/flags/lr.png
new file mode 100644
index 00000000..89a5bc7e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ls.png b/pole-sbv-content/plugins/polylang/flags/ls.png
new file mode 100644
index 00000000..33fdef10
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ls.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/lt.png b/pole-sbv-content/plugins/polylang/flags/lt.png
new file mode 100644
index 00000000..c8ef0da0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lt.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/lu.png b/pole-sbv-content/plugins/polylang/flags/lu.png
new file mode 100644
index 00000000..4cabba98
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lu.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/lv.png b/pole-sbv-content/plugins/polylang/flags/lv.png
new file mode 100644
index 00000000..49b69981
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lv.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ly.png b/pole-sbv-content/plugins/polylang/flags/ly.png
new file mode 100644
index 00000000..b163a9f8
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ly.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ma.png b/pole-sbv-content/plugins/polylang/flags/ma.png
new file mode 100644
index 00000000..f3867702
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ma.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mc.png b/pole-sbv-content/plugins/polylang/flags/mc.png
new file mode 100644
index 00000000..1aa830f1
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mc.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/md.png b/pole-sbv-content/plugins/polylang/flags/md.png
new file mode 100644
index 00000000..4e92c189
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/md.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/me.png b/pole-sbv-content/plugins/polylang/flags/me.png
new file mode 100644
index 00000000..ac725355
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/me.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mg.png b/pole-sbv-content/plugins/polylang/flags/mg.png
new file mode 100644
index 00000000..d2715b3d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mh.png b/pole-sbv-content/plugins/polylang/flags/mh.png
new file mode 100644
index 00000000..fb523a8c
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mh.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mk.png b/pole-sbv-content/plugins/polylang/flags/mk.png
new file mode 100644
index 00000000..db173aaf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mk.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ml.png b/pole-sbv-content/plugins/polylang/flags/ml.png
new file mode 100644
index 00000000..2cec8ba4
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ml.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mm.png b/pole-sbv-content/plugins/polylang/flags/mm.png
new file mode 100644
index 00000000..10340d26
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mn.png b/pole-sbv-content/plugins/polylang/flags/mn.png
new file mode 100644
index 00000000..9396355d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mo.png b/pole-sbv-content/plugins/polylang/flags/mo.png
new file mode 100644
index 00000000..deb801dd
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mo.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mp.png b/pole-sbv-content/plugins/polylang/flags/mp.png
new file mode 100644
index 00000000..298d588b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mp.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mq.png b/pole-sbv-content/plugins/polylang/flags/mq.png
new file mode 100644
index 00000000..010143b3
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mq.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mr.png b/pole-sbv-content/plugins/polylang/flags/mr.png
new file mode 100644
index 00000000..319546b1
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ms.png b/pole-sbv-content/plugins/polylang/flags/ms.png
new file mode 100644
index 00000000..d4cbb433
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ms.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mt.png b/pole-sbv-content/plugins/polylang/flags/mt.png
new file mode 100644
index 00000000..00af9487
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mt.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mu.png b/pole-sbv-content/plugins/polylang/flags/mu.png
new file mode 100644
index 00000000..b7fdce1b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mu.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mv.png b/pole-sbv-content/plugins/polylang/flags/mv.png
new file mode 100644
index 00000000..5073d9ec
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mv.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mw.png b/pole-sbv-content/plugins/polylang/flags/mw.png
new file mode 100644
index 00000000..13886e9f
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mw.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mx.png b/pole-sbv-content/plugins/polylang/flags/mx.png
new file mode 100644
index 00000000..5bc58ab3
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mx.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/my.png b/pole-sbv-content/plugins/polylang/flags/my.png
new file mode 100644
index 00000000..9034cbab
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/my.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/mz.png b/pole-sbv-content/plugins/polylang/flags/mz.png
new file mode 100644
index 00000000..76405e06
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/na.png b/pole-sbv-content/plugins/polylang/flags/na.png
new file mode 100644
index 00000000..63358c67
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/na.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/nc.png b/pole-sbv-content/plugins/polylang/flags/nc.png
new file mode 100644
index 00000000..2cad2837
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nc.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ne.png b/pole-sbv-content/plugins/polylang/flags/ne.png
new file mode 100644
index 00000000..d85f424f
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ne.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/nf.png b/pole-sbv-content/plugins/polylang/flags/nf.png
new file mode 100644
index 00000000..f9bcdda1
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nf.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ng.png b/pole-sbv-content/plugins/polylang/flags/ng.png
new file mode 100644
index 00000000..3eea2e02
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ng.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ni.png b/pole-sbv-content/plugins/polylang/flags/ni.png
new file mode 100644
index 00000000..3969aaaa
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ni.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/nl.png b/pole-sbv-content/plugins/polylang/flags/nl.png
new file mode 100644
index 00000000..fe44791e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nl.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/no.png b/pole-sbv-content/plugins/polylang/flags/no.png
new file mode 100644
index 00000000..160b6b5b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/no.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/np.png b/pole-sbv-content/plugins/polylang/flags/np.png
new file mode 100644
index 00000000..aeb058b7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/np.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/nr.png b/pole-sbv-content/plugins/polylang/flags/nr.png
new file mode 100644
index 00000000..705fc337
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/nu.png b/pole-sbv-content/plugins/polylang/flags/nu.png
new file mode 100644
index 00000000..c3ce4aed
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nu.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/nz.png b/pole-sbv-content/plugins/polylang/flags/nz.png
new file mode 100644
index 00000000..10d6306d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/occitania.png b/pole-sbv-content/plugins/polylang/flags/occitania.png
new file mode 100644
index 00000000..e500b351
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/occitania.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/om.png b/pole-sbv-content/plugins/polylang/flags/om.png
new file mode 100644
index 00000000..2ffba7e8
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/om.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pa.png b/pole-sbv-content/plugins/polylang/flags/pa.png
new file mode 100644
index 00000000..9b2ee9a7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pa.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pe.png b/pole-sbv-content/plugins/polylang/flags/pe.png
new file mode 100644
index 00000000..62a04977
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pe.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pf.png b/pole-sbv-content/plugins/polylang/flags/pf.png
new file mode 100644
index 00000000..771a0f65
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pf.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pg.png b/pole-sbv-content/plugins/polylang/flags/pg.png
new file mode 100644
index 00000000..10d62334
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ph.png b/pole-sbv-content/plugins/polylang/flags/ph.png
new file mode 100644
index 00000000..b89e1593
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ph.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pk.png b/pole-sbv-content/plugins/polylang/flags/pk.png
new file mode 100644
index 00000000..e9df70ca
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pk.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pl.png b/pole-sbv-content/plugins/polylang/flags/pl.png
new file mode 100644
index 00000000..d413d010
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pl.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pm.png b/pole-sbv-content/plugins/polylang/flags/pm.png
new file mode 100644
index 00000000..ba91d2c7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pn.png b/pole-sbv-content/plugins/polylang/flags/pn.png
new file mode 100644
index 00000000..aa9344f5
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pr.png b/pole-sbv-content/plugins/polylang/flags/pr.png
new file mode 100644
index 00000000..82d9130d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ps.png b/pole-sbv-content/plugins/polylang/flags/ps.png
new file mode 100644
index 00000000..f5f54776
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ps.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pt.png b/pole-sbv-content/plugins/polylang/flags/pt.png
new file mode 100644
index 00000000..ece79801
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pt.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/pw.png b/pole-sbv-content/plugins/polylang/flags/pw.png
new file mode 100644
index 00000000..6178b254
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pw.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/py.png b/pole-sbv-content/plugins/polylang/flags/py.png
new file mode 100644
index 00000000..cb8723c0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/py.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/qa.png b/pole-sbv-content/plugins/polylang/flags/qa.png
new file mode 100644
index 00000000..ed4c621f
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/qa.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/quebec.png b/pole-sbv-content/plugins/polylang/flags/quebec.png
new file mode 100644
index 00000000..a90cf0bb
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/quebec.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ro.png b/pole-sbv-content/plugins/polylang/flags/ro.png
new file mode 100644
index 00000000..57e74a65
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ro.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/rs.png b/pole-sbv-content/plugins/polylang/flags/rs.png
new file mode 100644
index 00000000..9439a5b6
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/rs.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ru.png b/pole-sbv-content/plugins/polylang/flags/ru.png
new file mode 100644
index 00000000..47da4214
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ru.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/rw.png b/pole-sbv-content/plugins/polylang/flags/rw.png
new file mode 100644
index 00000000..53564917
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/rw.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sa.png b/pole-sbv-content/plugins/polylang/flags/sa.png
new file mode 100644
index 00000000..b4641c7e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sa.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sb.png b/pole-sbv-content/plugins/polylang/flags/sb.png
new file mode 100644
index 00000000..a9937ccf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sb.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sc.png b/pole-sbv-content/plugins/polylang/flags/sc.png
new file mode 100644
index 00000000..39ee3718
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sc.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/scotland.png b/pole-sbv-content/plugins/polylang/flags/scotland.png
new file mode 100644
index 00000000..a0e57b41
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/scotland.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sd.png b/pole-sbv-content/plugins/polylang/flags/sd.png
new file mode 100644
index 00000000..eaab69eb
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sd.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/se.png b/pole-sbv-content/plugins/polylang/flags/se.png
new file mode 100644
index 00000000..1994653d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/se.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sg.png b/pole-sbv-content/plugins/polylang/flags/sg.png
new file mode 100644
index 00000000..dd34d612
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sh.png b/pole-sbv-content/plugins/polylang/flags/sh.png
new file mode 100644
index 00000000..4b1d2a29
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sh.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/si.png b/pole-sbv-content/plugins/polylang/flags/si.png
new file mode 100644
index 00000000..bb1476ff
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/si.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sk.png b/pole-sbv-content/plugins/polylang/flags/sk.png
new file mode 100644
index 00000000..7ccbc827
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sk.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sl.png b/pole-sbv-content/plugins/polylang/flags/sl.png
new file mode 100644
index 00000000..12d812d2
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sl.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sm.png b/pole-sbv-content/plugins/polylang/flags/sm.png
new file mode 100644
index 00000000..3df2fdcf
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sn.png b/pole-sbv-content/plugins/polylang/flags/sn.png
new file mode 100644
index 00000000..eabb71db
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/so.png b/pole-sbv-content/plugins/polylang/flags/so.png
new file mode 100644
index 00000000..4a1ea4b2
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/so.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sr.png b/pole-sbv-content/plugins/polylang/flags/sr.png
new file mode 100644
index 00000000..5eff9271
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ss.png b/pole-sbv-content/plugins/polylang/flags/ss.png
new file mode 100644
index 00000000..6b5018a2
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ss.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/st.png b/pole-sbv-content/plugins/polylang/flags/st.png
new file mode 100644
index 00000000..2978557b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/st.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sv.png b/pole-sbv-content/plugins/polylang/flags/sv.png
new file mode 100644
index 00000000..24987990
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sv.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sy.png b/pole-sbv-content/plugins/polylang/flags/sy.png
new file mode 100644
index 00000000..f5ce30dc
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sy.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/sz.png b/pole-sbv-content/plugins/polylang/flags/sz.png
new file mode 100644
index 00000000..914ee861
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tc.png b/pole-sbv-content/plugins/polylang/flags/tc.png
new file mode 100644
index 00000000..8fc1156b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tc.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/td.png b/pole-sbv-content/plugins/polylang/flags/td.png
new file mode 100644
index 00000000..667f21fd
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/td.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tf.png b/pole-sbv-content/plugins/polylang/flags/tf.png
new file mode 100644
index 00000000..80529a43
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tf.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tg.png b/pole-sbv-content/plugins/polylang/flags/tg.png
new file mode 100644
index 00000000..3aa00ad4
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/th.png b/pole-sbv-content/plugins/polylang/flags/th.png
new file mode 100644
index 00000000..dd8ba917
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/th.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tibet.png b/pole-sbv-content/plugins/polylang/flags/tibet.png
new file mode 100644
index 00000000..6ecc135e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tibet.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tj.png b/pole-sbv-content/plugins/polylang/flags/tj.png
new file mode 100644
index 00000000..617bf645
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tj.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tk.png b/pole-sbv-content/plugins/polylang/flags/tk.png
new file mode 100644
index 00000000..67b8c8cb
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tk.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tl.png b/pole-sbv-content/plugins/polylang/flags/tl.png
new file mode 100644
index 00000000..77da181e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tl.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tm.png b/pole-sbv-content/plugins/polylang/flags/tm.png
new file mode 100644
index 00000000..828020ec
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tn.png b/pole-sbv-content/plugins/polylang/flags/tn.png
new file mode 100644
index 00000000..183cdd3d
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/to.png b/pole-sbv-content/plugins/polylang/flags/to.png
new file mode 100644
index 00000000..f89b8ba7
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/to.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tr.png b/pole-sbv-content/plugins/polylang/flags/tr.png
new file mode 100644
index 00000000..be32f77e
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tr.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tt.png b/pole-sbv-content/plugins/polylang/flags/tt.png
new file mode 100644
index 00000000..2a11c1e2
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tt.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tv.png b/pole-sbv-content/plugins/polylang/flags/tv.png
new file mode 100644
index 00000000..28274c5f
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tv.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tw.png b/pole-sbv-content/plugins/polylang/flags/tw.png
new file mode 100644
index 00000000..f31c654c
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tw.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/tz.png b/pole-sbv-content/plugins/polylang/flags/tz.png
new file mode 100644
index 00000000..c00ff796
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ua.png b/pole-sbv-content/plugins/polylang/flags/ua.png
new file mode 100644
index 00000000..09563a21
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ua.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ug.png b/pole-sbv-content/plugins/polylang/flags/ug.png
new file mode 100644
index 00000000..33f4affa
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ug.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/us.png b/pole-sbv-content/plugins/polylang/flags/us.png
new file mode 100644
index 00000000..10f451fe
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/us.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/uy.png b/pole-sbv-content/plugins/polylang/flags/uy.png
new file mode 100644
index 00000000..31d948a0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/uy.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/uz.png b/pole-sbv-content/plugins/polylang/flags/uz.png
new file mode 100644
index 00000000..fef5dc17
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/uz.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/va.png b/pole-sbv-content/plugins/polylang/flags/va.png
new file mode 100644
index 00000000..b31eaf22
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/va.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/vc.png b/pole-sbv-content/plugins/polylang/flags/vc.png
new file mode 100644
index 00000000..8fa17b06
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vc.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ve.png b/pole-sbv-content/plugins/polylang/flags/ve.png
new file mode 100644
index 00000000..00c90f9a
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ve.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/veneto.png b/pole-sbv-content/plugins/polylang/flags/veneto.png
new file mode 100644
index 00000000..8dcf6a7b
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/veneto.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/vg.png b/pole-sbv-content/plugins/polylang/flags/vg.png
new file mode 100644
index 00000000..41569079
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vg.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/vi.png b/pole-sbv-content/plugins/polylang/flags/vi.png
new file mode 100644
index 00000000..ed26915a
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vi.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/vn.png b/pole-sbv-content/plugins/polylang/flags/vn.png
new file mode 100644
index 00000000..ec7cd48a
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vn.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/vu.png b/pole-sbv-content/plugins/polylang/flags/vu.png
new file mode 100644
index 00000000..b3397bc6
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vu.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/wales.png b/pole-sbv-content/plugins/polylang/flags/wales.png
new file mode 100644
index 00000000..e0d7cee1
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/wales.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/wf.png b/pole-sbv-content/plugins/polylang/flags/wf.png
new file mode 100644
index 00000000..9f955873
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/wf.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ws.png b/pole-sbv-content/plugins/polylang/flags/ws.png
new file mode 100644
index 00000000..c1695080
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ws.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/ye.png b/pole-sbv-content/plugins/polylang/flags/ye.png
new file mode 100644
index 00000000..468dfad0
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ye.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/yt.png b/pole-sbv-content/plugins/polylang/flags/yt.png
new file mode 100644
index 00000000..c298f378
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/yt.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/za.png b/pole-sbv-content/plugins/polylang/flags/za.png
new file mode 100644
index 00000000..57c58e21
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/za.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/zm.png b/pole-sbv-content/plugins/polylang/flags/zm.png
new file mode 100644
index 00000000..c25b07be
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/zm.png differ
diff --git a/pole-sbv-content/plugins/polylang/flags/zw.png b/pole-sbv-content/plugins/polylang/flags/zw.png
new file mode 100644
index 00000000..53c97259
Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/zw.png differ
diff --git a/pole-sbv-content/plugins/polylang/frontend/choose-lang-content.php b/pole-sbv-content/plugins/polylang/frontend/choose-lang-content.php
new file mode 100644
index 00000000..7a468e62
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/choose-lang-content.php
@@ -0,0 +1,141 @@
+options['media_support'] ) ) {
+ return $this->get_preferred_language();
+ }
+
+ if ( $var = get_query_var( 'lang' ) ) {
+ $lang = explode( ',',$var );
+ $lang = $this->model->get_language( reset( $lang ) ); // choose the first queried language
+ }
+
+ elseif ( ( is_single() || is_page() || ( is_attachment() && $this->options['media_support'] ) ) && ( ( $var = get_queried_object_id() ) || ( $var = get_query_var( 'p' ) ) || ( $var = get_query_var( 'page_id' ) ) || ( $var = get_query_var( 'attachment_id' ) ) ) ) {
+ $lang = $this->model->post->get_language( $var );
+ }
+
+ else {
+ foreach ( $this->model->get_translated_taxonomies() as $taxonomy ) {
+ if ( $var = get_query_var( get_taxonomy( $taxonomy )->query_var ) ) {
+ $lang = $this->model->term->get_language( $var, $taxonomy );
+ }
+ }
+ }
+
+ /**
+ * Filter the language before it is set from the content
+ *
+ * @since 0.9
+ *
+ * @param bool|object $lang language object or false if none was found
+ */
+ return apply_filters( 'pll_get_current_language', isset( $lang ) ? $lang : false );
+ }
+
+ /**
+ * sets the language for home page
+ * add the lang query var when querying archives with no language code
+ *
+ * @since 1.2
+ *
+ * @param object $query instance of WP_Query
+ */
+ public function parse_main_query( $query ) {
+ if ( $query !== $GLOBALS['wp_the_query'] ) {
+ return;
+ }
+
+ $qv = $query->query_vars;
+
+ // homepage is requested, let's set the language
+ // take care to avoid posts page for which is_home = 1
+ if ( empty( $query->query ) && ( is_home() || is_page() ) ) {
+ $this->home_language();
+ $this->home_requested();
+ }
+
+ parent::parse_main_query( $query );
+
+ $is_archive = ( count( $query->query ) == 1 && ! empty( $qv['paged'] ) ) ||
+ $query->is_date ||
+ $query->is_author ||
+ ( ! empty( $qv['post_type'] ) && $query->is_post_type_archive && $this->model->is_translated_post_type( $qv['post_type'] ) );
+
+ // sets the language in case we hide the default language
+ // use $query->query['s'] as is_search is not set when search is empty
+ // http://wordpress.org/support/topic/search-for-empty-string-in-default-language
+ if ( $this->options['hide_default'] && ! isset( $qv['lang'] ) && ( $is_archive || isset( $query->query['s'] ) || ( count( $query->query ) == 1 && ! empty( $qv['feed'] ) ) ) ) {
+ $this->set_language( $this->model->get_language( $this->options['default_lang'] ) );
+ $this->set_curlang_in_query( $query );
+ }
+ }
+
+ /**
+ * sets the language from content
+ *
+ * @since 1.2
+ */
+ public function wp() {
+ // nothing to do if the language has already been set ( although normally the filter has been removed )
+ if ( ! $this->curlang && $curlang = $this->get_language_from_content() ) {
+ parent::set_language( $curlang );
+ }
+ }
+
+ /**
+ * if no language found by get_language_from_content, return the preferred one
+ *
+ * @since 0.9
+ *
+ * @param object|bool $lang Language found in get_language_from_content
+ * @return object Language
+ */
+ public function pll_get_current_language( $lang ) {
+ return ! $lang ? $this->get_preferred_language() : $lang;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/choose-lang-domain.php b/pole-sbv-content/plugins/polylang/frontend/choose-lang-domain.php
new file mode 100644
index 00000000..74eabd0b
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/choose-lang-domain.php
@@ -0,0 +1,36 @@
+model->get_language( $this->links_model->get_language_from_url() );
+ }
+
+ /**
+ * Adds query vars to query for home pages in all languages
+ *
+ * @since 1.5
+ */
+ public function home_requested() {
+ $this->set_curlang_in_query( $GLOBALS['wp_query'] );
+ /** This action is documented in include/choose-lang.php */
+ do_action( 'pll_home_requested' );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/choose-lang-url.php b/pole-sbv-content/plugins/polylang/frontend/choose-lang-url.php
new file mode 100644
index 00000000..158b2e1f
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/choose-lang-url.php
@@ -0,0 +1,102 @@
+set_language_from_url();
+ }
+
+ add_action( 'request', array( $this, 'request' ) );
+ }
+
+ /**
+ * finds the language according to information found in the url
+ *
+ * @since 1.2
+ */
+ public function set_language_from_url() {
+ $host = str_replace( 'www.', '', parse_url( $this->links_model->home, PHP_URL_HOST ) );
+ $home_path = parse_url( $this->links_model->home, PHP_URL_PATH );
+
+ $requested_host = str_replace( 'www.', '', $_SERVER['HTTP_HOST'] );
+ $requested_uri = rtrim( str_replace( $this->index, '', $_SERVER['REQUEST_URI'] ), '/' ); // some PHP setups turn requests for / into /index.php in REQUEST_URI
+
+ // home is resquested
+ if ( $requested_host == $host && $requested_uri == $home_path && empty( $_SERVER['QUERY_STRING'] ) ) {
+ $this->home_language();
+ add_action( 'setup_theme', array( $this, 'home_requested' ) );
+ }
+
+ // take care to post & page preview http://wordpress.org/support/topic/static-frontpage-url-parameter-url-language-information
+ elseif ( isset( $_GET['preview'] ) && ( ( isset( $_GET['p'] ) && $id = (int) $_GET['p'] ) || ( isset( $_GET['page_id'] ) && $id = (int) $_GET['page_id'] ) ) ) {
+ $curlang = ( $lg = $this->model->post->get_language( $id ) ) ? $lg : $this->model->get_language( $this->options['default_lang'] );
+ }
+
+ // take care to ( unattached ) attachments
+ elseif ( isset( $_GET['attachment_id'] ) && $id = (int) $_GET['attachment_id'] ) {
+ $curlang = ( $lg = $this->model->post->get_language( $id ) ) ? $lg : $this->get_preferred_language();
+ }
+
+ elseif ( $slug = $this->links_model->get_language_from_url() ) {
+ $curlang = $this->model->get_language( $slug );
+ }
+
+ elseif ( $this->options['hide_default'] ) {
+ $curlang = $this->model->get_language( $this->options['default_lang'] );
+ }
+
+ // if no language found, check_language_code_in_url will attempt to find one and redirect to the correct url
+ // otherwise 404 will be fired in the preferred language
+ $this->set_language( empty( $curlang ) ? $this->get_preferred_language() : $curlang );
+ }
+
+
+ /**
+ * adds the current language in query vars
+ * useful for subdomains and multiple domains
+ *
+ * @since 1.8
+ *
+ * @param array $qv main request query vars
+ * @return array modified query vars
+ */
+ public function request( $qv ) {
+ // FIXME take care not to break untranslated content
+ // FIXME media ?
+
+ // untranslated post types
+ if ( isset( $qv['post_type'] ) && ! $this->model->is_translated_post_type( $qv['post_type'] ) ) {
+ return $qv;
+ }
+
+ // untranslated taxonomies
+ $tax_qv = array_filter( wp_list_pluck( get_taxonomies( array(), 'objects' ), 'query_var' ) ); // get all taxonomies query vars
+ $tax_qv = array_intersect( $tax_qv, array_keys( $qv ) ); // get all queried taxonomies query vars
+
+ if ( ! $this->model->is_translated_taxonomy( array_keys( $tax_qv ) ) ) {
+ return $qv;
+ }
+
+ if ( isset( $this->curlang ) && empty( $qv['lang'] ) ) {
+ $qv['lang'] = $this->curlang->slug;
+ }
+
+ return $qv;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/choose-lang.php b/pole-sbv-content/plugins/polylang/frontend/choose-lang.php
new file mode 100644
index 00000000..c68de983
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/choose-lang.php
@@ -0,0 +1,328 @@
+links_model = &$polylang->links_model;
+ $this->model = &$polylang->model;
+ $this->options = &$polylang->options;
+
+ $this->curlang = &$polylang->curlang;
+ }
+
+ /**
+ * sets the language for ajax requests
+ * and setup actions
+ * any child class must call this method if it overrides it
+ *
+ * @since 1.8
+ */
+ public function init() {
+ if ( PLL_AJAX_ON_FRONT || false === stripos( $_SERVER['SCRIPT_FILENAME'], 'index.php' ) ) {
+ $this->set_language( empty( $_REQUEST['lang'] ) ? $this->get_preferred_language() : $this->model->get_language( $_REQUEST['lang'] ) );
+ }
+
+ add_action( 'pre_comment_on_post', array( $this, 'pre_comment_on_post' ) ); // sets the language of comment
+ add_action( 'parse_query', array( $this, 'parse_main_query' ), 2 ); // sets the language in special cases
+ add_action( 'wp', array( $this, 'maybe_setcookie' ), 7 );
+ }
+
+ /**
+ * writes language cookie
+ * loads user defined translations
+ * fires the action 'pll_language_defined'
+ *
+ * @since 1.2
+ *
+ * @param object $curlang current language
+ */
+ protected function set_language( $curlang ) {
+ // don't set the language a second time
+ if ( isset( $this->curlang ) ) {
+ return;
+ }
+
+ // final check in case $curlang has an unexpected value
+ // see https://wordpress.org/support/topic/detect-browser-language-sometimes-setting-null-language
+ $this->curlang = ( $curlang instanceof PLL_Language ) ? $curlang : $this->model->get_language( $this->options['default_lang'] );
+
+ $GLOBALS['text_direction'] = $this->curlang->is_rtl ? 'rtl' : 'ltr';
+
+ /**
+ * Fires when the current language is defined
+ *
+ * @since 0.9.5
+ *
+ * @param string $slug current language code
+ * @param object $curlang current language object
+ */
+ do_action( 'pll_language_defined', $this->curlang->slug, $this->curlang );
+ }
+
+ /**
+ * set a cookie to remember the language.
+ * possibility to set PLL_COOKIE to false will disable cookie although it will break some functionalities
+ *
+ * @since 1.5
+ */
+ public function maybe_setcookie() {
+ // check headers have not been sent to avoid ugly error
+ // cookie domain must be set to false for localhost ( default value for COOKIE_DOMAIN ) thanks to Stephen Harris.
+ if ( ! headers_sent() && PLL_COOKIE !== false && ! empty( $this->curlang ) && ( ! isset( $_COOKIE[ PLL_COOKIE ] ) || $_COOKIE[ PLL_COOKIE ] != $this->curlang->slug ) && ! is_404() ) {
+
+ /**
+ * Filter the Polylang cookie duration
+ *
+ * @since 1.8
+ *
+ * @param int $duration cookie duration in seconds
+ */
+ $expiration = apply_filters( 'pll_cookie_expiration', YEAR_IN_SECONDS );
+
+ setcookie(
+ PLL_COOKIE,
+ $this->curlang->slug,
+ time() + $expiration,
+ COOKIEPATH,
+ 2 == $this->options['force_lang'] ? parse_url( $this->links_model->home, PHP_URL_HOST ) : COOKIE_DOMAIN,
+ is_ssl()
+ );
+ }
+ }
+
+ /**
+ * get the preferred language according to the browser preferences
+ * code adapted from http://www.thefutureoftheweb.com/blog/use-accept-language-header
+ *
+ * @since 1.8
+ *
+ * @return string|bool the preferred language slug or false
+ */
+ public function get_preferred_browser_language() {
+ $accept_langs = array();
+
+ if ( isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) {
+ // break up string into pieces ( languages and q factors )
+ preg_match_all( '/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*( 1|0\.[0-9]+))?/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse );
+
+ $k = $lang_parse[1];
+ $v = $lang_parse[4];
+
+ if ( $n = count( $k ) ) {
+ // set default to 1 for any without q factor
+ foreach ( $v as $key => $val ) {
+ if ( '' === $val ) {
+ $v[ $key ] = 1;
+ }
+ }
+
+ // bubble sort ( need a stable sort for Android, so can't use a PHP sort function )
+ if ( $n > 1 ) {
+ for ( $i = 2; $i <= $n; $i++ ) {
+ for ( $j = 0; $j <= $n - 2; $j++ ) {
+ if ( $v[ $j ] < $v[ $j + 1 ] ) {
+ // swap values
+ $temp = $v[ $j ];
+ $v[ $j ] = $v[ $j + 1 ];
+ $v[ $j + 1 ] = $temp;
+ // Swap keys
+ $temp = $k[ $j ];
+ $k[ $j ] = $k[ $j + 1 ];
+ $k[ $j + 1 ] = $temp;
+ }
+ }
+ }
+ }
+ $accept_langs = array_combine( $k,$v );
+ }
+ }
+
+ $languages = $this->model->get_languages_list( array( 'hide_empty' => true ) ); // hides languages with no post
+
+ /**
+ * Filter the list of languages to use to match the browser preferences
+ *
+ * @since 1.9.3
+ *
+ * @param array $languages array of PLL_Language objects
+ */
+ $languages = apply_filters( 'pll_languages_for_browser_preferences', $languages );
+
+ // looks through sorted list and use first one that matches our language list
+ foreach ( array_keys( $accept_langs ) as $accept_lang ) {
+ // first loop to match the exact locale
+ foreach ( $languages as $language ) {
+ if ( 0 === strcasecmp( $accept_lang, $language->get_locale( 'display' ) ) ) {
+ return $language->slug;
+ }
+ }
+
+ // second loop to match the language set
+ foreach ( $languages as $language ) {
+ if ( 0 === stripos( $accept_lang, $language->slug ) || 0 === stripos( $language->get_locale( 'display' ), $accept_lang ) ) {
+ return $language->slug;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * returns the language according to browser preference or the default language
+ *
+ * @since 0.1
+ *
+ * @return object browser preferred language or default language
+ */
+ public function get_preferred_language() {
+ // check first if the user was already browsing this site
+ if ( isset( $_COOKIE[ PLL_COOKIE ] ) ) {
+ return $this->model->get_language( $_COOKIE[ PLL_COOKIE ] );
+ }
+
+ /**
+ * Filter the visitor's preferred language (normally set first by cookie
+ * if this is not the first visit, then by the browser preferences).
+ * If no preferred language has been found or set by this filter,
+ * Polylang fallbacks to the default language
+ *
+ * @since 1.0
+ *
+ * @param string $language preferred language code
+ */
+ $slug = apply_filters( 'pll_preferred_language', $this->options['browser'] ? $this->get_preferred_browser_language() : false );
+
+ // return default if there is no preferences in the browser or preferences does not match our languages or it is requested not to use the browser preference
+ return ( $lang = $this->model->get_language( $slug ) ) ? $lang : $this->model->get_language( $this->options['default_lang'] );
+ }
+
+ /**
+ * sets the language when home page is resquested
+ *
+ * @since 1.2
+ */
+ protected function home_language() {
+ // test referer in case PLL_COOKIE is set to false
+ // thanks to Ov3rfly http://wordpress.org/support/topic/enhance-feature-when-front-page-is-visited-set-language-according-to-browser
+ $language = $this->options['hide_default'] && ( ( isset( $_SERVER['HTTP_REFERER'] ) && in_array( parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_HOST ), $this->links_model->get_hosts() ) ) || ! $this->options['browser'] ) ?
+ $this->model->get_language( $this->options['default_lang'] ) :
+ $this->get_preferred_language(); // sets the language according to browser preference or default language
+ $this->set_language( $language );
+ }
+
+ /**
+ * to call when the home page has been requested
+ * make sure to call this after 'setup_theme' has been fired as we need $wp_query
+ * performs a redirection to the home page in the current language if needed
+ *
+ * @since 0.9
+ */
+ public function home_requested() {
+ // we are already on the right page
+ if ( $this->options['default_lang'] == $this->curlang->slug && $this->options['hide_default'] ) {
+ $this->set_curlang_in_query( $GLOBALS['wp_query'] );
+
+ /**
+ * Fires when the site root page is requested
+ *
+ * @since 1.8
+ */
+ do_action( 'pll_home_requested' );
+ }
+ // redirect to the home page in the right language
+ // test to avoid crash if get_home_url returns something wrong
+ // FIXME why this happens? http://wordpress.org/support/topic/polylang-crashes-1
+ // don't redirect if $_POST is not empty as it could break other plugins
+ // don't forget the query string which may be added by plugins
+ elseif ( is_string( $redirect = $this->curlang->home_url ) && empty( $_POST ) ) {
+ $redirect = empty( $_SERVER['QUERY_STRING'] ) ? $redirect : $redirect . ( $this->links_model->using_permalinks ? '?' : '&' ) . $_SERVER['QUERY_STRING'];
+
+ /**
+ * When a visitor reaches the site home, Polylang redirects to the home page in the correct language.
+ * This filter allows plugins to modify the redirected url or prevent this redirection
+ *
+ * @since 1.1.1
+ *
+ * @param string $redirect the url the visitor will be redirected to
+ */
+ if ( $redirect = apply_filters( 'pll_redirect_home', $redirect ) ) {
+ wp_redirect( $redirect );
+ exit;
+ }
+ }
+ }
+
+ /**
+ * set the language when posting a comment
+ *
+ * @since 0.8.4
+ *
+ * @param int $post_id the post beeing commented
+ */
+ public function pre_comment_on_post( $post_id ) {
+ $this->set_language( $this->model->post->get_language( $post_id ) );
+ }
+
+ /**
+ * modifies some main query vars for home page and page for posts
+ * to enable one home page ( and one page for posts ) per language
+ *
+ * @since 1.2
+ *
+ * @param object $query instance of WP_Query
+ */
+ public function parse_main_query( $query ) {
+ if ( ! $query->is_main_query() ) {
+ return;
+ }
+
+ /**
+ * This filter allows to set the language based on information contained in the main query
+ *
+ * @since 1.8
+ *
+ * @param bool|object $lang false or language object
+ * @param object $query WP_Query object
+ */
+ if ( $lang = apply_filters( 'pll_set_language_from_query', false, $query ) ) {
+ $this->set_language( $lang );
+ $this->set_curlang_in_query( $query );
+ }
+
+ // sets is_home on translated home page when it displays posts
+ // is_home must be true on page 2, 3... too
+ // as well as when searching an empty string: http://wordpress.org/support/topic/plugin-polylang-polylang-breaks-search-in-spun-theme
+ if ( 'posts' == get_option( 'show_on_front' ) && ( count( $query->query ) == 1 || ( is_paged() && count( $query->query ) == 2 ) || ( isset( $query->query['s'] ) && ! $query->query['s'] ) ) && $lang = get_query_var( 'lang' ) ) {
+ $lang = $this->model->get_language( $lang );
+ $this->set_language( $lang ); // sets the language now otherwise it will be too late to filter sticky posts !
+ $query->is_home = true;
+ $query->is_archive = $query->is_tax = false;
+ }
+ }
+
+ /**
+ * Sets the current language in the query
+ *
+ * @since 2.2
+ *
+ * @param object $query
+ */
+ protected function set_curlang_in_query( &$query ) {
+ $pll_query = new PLL_Query( $query, $this->model );
+ $pll_query->set_language( $this->curlang );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-auto-translate.php b/pole-sbv-content/plugins/polylang/frontend/frontend-auto-translate.php
new file mode 100644
index 00000000..3f46f714
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/frontend-auto-translate.php
@@ -0,0 +1,250 @@
+model = &$polylang->model;
+ $this->curlang = &$polylang->curlang;
+
+ add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) ); // after main Polylang filter
+ add_filter( 'get_terms_args', array( $this, 'get_terms_args' ), 10, 2 );
+ }
+
+ /**
+ * helper function to get the translated post in the current language
+ *
+ * since 1.8
+ *
+ * @param int $post_id
+ * @return int
+ */
+ protected function get_post( $post_id ) {
+ return $this->model->post->get( $post_id, $this->curlang );
+ }
+
+ /**
+ * helper function to get the translated term in the current language
+ *
+ * since 1.8
+ *
+ * @param int $term_id
+ * @return int
+ */
+ protected function get_term( $term_id ) {
+ return $this->model->term->get( $term_id, $this->curlang );
+ }
+
+ /**
+ * filters posts query to automatically translate included ids
+ *
+ * @since 1.1
+ *
+ * @param object $query WP_Query object
+ */
+ public function pre_get_posts( $query ) {
+ global $wpdb;
+ $qv = &$query->query_vars;
+
+ if ( $query->is_main_query() || isset( $qv['lang'] ) || ( ! empty( $qv['post_type'] ) && ! $this->model->is_translated_post_type( $qv['post_type'] ) ) ) {
+ return;
+ }
+
+ // /!\ always keep untranslated as is
+
+ // term ids separated by a comma
+ $arr = array();
+ if ( ! empty( $qv['cat'] ) ) {
+ foreach ( explode( ',', $qv['cat'] ) as $cat ) {
+ $tr = $this->get_term( abs( $cat ) );
+ $arr[] = $cat < 0 ? -$tr : $tr;
+ }
+
+ $qv['cat'] = implode( ',', $arr );
+ }
+
+ // category_name
+ $arr = array();
+ if ( ! empty( $qv['category_name'] ) ) {
+ foreach ( explode( ',', $qv['category_name'] ) as $slug ) {
+ $arr[] = ( ( $cat = wpcom_vip_get_category_by_slug( $slug ) ) && ( $tr_id = $this->get_term( $cat->term_id ) ) && ! is_wp_error( $tr = get_category( $tr_id ) ) ) ? $tr->slug : $slug;
+ }
+
+ $qv['category_name'] = implode( ',', $arr );
+ }
+
+ // array of term ids
+ foreach ( array( 'category__and', 'category__in', 'category__not_in', 'tag__and', 'tag__in', 'tag__not_in' ) as $key ) {
+ $arr = array();
+ if ( ! empty( $qv[ $key ] ) ) {
+ foreach ( $qv[ $key ] as $cat ) {
+ $arr[] = ( $tr = $this->get_term( $cat ) ) ? $tr : $cat;
+ }
+ $qv[ $key ] = $arr;
+ }
+ }
+
+ // tag
+ $arr = array();
+ if ( ! empty( $qv['tag'] ) ) {
+ $sep = strpos( $qv['tag'], ',' ) !== false ? ',' : '+'; // two possible separators for tag slugs
+ foreach ( explode( $sep, $qv['tag'] ) as $slug ) {
+ $arr[] = ( ( $tag = wpcom_vip_get_term_by( 'slug', $slug, 'post_tag' ) ) && ( $tr_id = $this->get_term( $tag->term_id ) ) && ! is_wp_error( $tr = get_tag( $tr_id ) ) ) ? $tr->slug : $slug;
+ }
+
+ $qv['tag'] = implode( $sep, $arr );
+ }
+
+ // tag_id can only take one id
+ if ( ! empty( $qv['tag_id'] ) && $tr_id = $this->get_term( $qv['tag_id'] ) ) {
+ $qv['tag_id'] = $tr_id;
+ }
+
+ // array of tag slugs
+ foreach ( array( 'tag_slug__and', 'tag_slug__in' ) as $key ) {
+ $arr = array();
+ if ( ! empty( $qv[ $key ] ) ) {
+ foreach ( $qv[ $key ] as $slug ) {
+ $arr[] = ( ( $tag = wpcom_vip_get_term_by( 'slug', $slug, 'post_tag' ) ) && ( $tr_id = $this->get_term( $tag->term_id ) ) && ! is_wp_error( $tr = get_tag( $tr_id ) ) ) ? $tr->slug : $slug;
+ }
+
+ $qv[ $key ] = $arr;
+ }
+ }
+
+ // custom taxonomies
+ // according to codex, this type of query is deprecated as of WP 3.1 but it does not appear in WP 3.5 source code
+ foreach ( array_intersect( $this->model->get_translated_taxonomies(), get_taxonomies( array( '_builtin' => false ) ) ) as $taxonomy ) {
+ $tax = get_taxonomy( $taxonomy );
+ $arr = array();
+ if ( ! empty( $qv[ $tax->query_var ] ) ) {
+ $sep = strpos( $qv[ $tax->query_var ], ',' ) !== false ? ',' : '+'; // two possible separators
+ foreach ( explode( $sep, $qv[ $tax->query_var ] ) as $slug ) {
+ $arr[] = ( ( $tag = wpcom_vip_get_term_by( 'slug', $slug, $taxonomy ) ) && ( $tr_id = $this->get_term( $tag->term_id ) ) && ! is_wp_error( $tr = get_term( $tr_id, $taxonomy ) ) ) ? $tr->slug : $slug;
+ }
+
+ $qv[ $tax->query_var ] = implode( $sep, $arr );
+ }
+ }
+
+ // tax_query since WP 3.1
+ if ( ! empty( $qv['tax_query'] ) && is_array( $qv['tax_query'] ) ) {
+ $qv['tax_query'] = $this->translate_tax_query_recursive( $qv['tax_query'] );
+ }
+
+ // p, page_id, post_parent can only take one id
+ foreach ( array( 'p', 'page_id', 'post_parent' ) as $key ) {
+ if ( ! empty( $qv[ $key ] ) && $tr_id = $this->get_post( $qv[ $key ] ) ) {
+ $qv[ $key ] = $tr_id;
+ }
+ }
+
+ // name, can only take one slug
+ if ( ! empty( $qv['name'] ) ) {
+ if ( empty( $qv['post_type'] ) ) {
+ $post_types = array( 'post' );
+ } elseif ( 'any' === $qv['post_type'] ) {
+ $post_types = get_post_types( array('exclude_from_search' => false) ); // May return a empty array
+ } else {
+ $post_types = (array) $qv['post_type'];
+ }
+
+ if ( ! empty( $post_types ) ) {
+ // no function to get post by name except get_posts itself
+ $where = "{$wpdb->posts}.post_type IN ('" . implode( "', '", esc_sql( $post_types ) ) . "')";
+ $id = $wpdb->get_var( $wpdb->prepare( "SELECT ID from {$wpdb->posts} WHERE {$where} AND post_name=%s", $qv['name'] ) );
+ $qv['name'] = ( $id && ( $tr_id = $this->get_post( $id ) ) && $tr = get_post( $tr_id ) ) ? $tr->post_name : $qv['name'];
+ }
+ }
+
+ // pagename, the page id is already available in queried_object_id
+ if ( ! empty( $qv['pagename'] ) && ! empty( $query->queried_object_id ) && $tr_id = $this->get_post( $query->queried_object_id ) ) {
+ $query->queried_object_id = $tr_id;
+ $qv['pagename'] = get_page_uri( $tr_id );
+ }
+
+ // array of post ids
+ // post_parent__in & post_parent__not_in since WP 3.6
+ foreach ( array( 'post__in', 'post__not_in', 'post_parent__in', 'post_parent__not_in' ) as $key ) {
+ $arr = array();
+ if ( ! empty( $qv[ $key ] ) ) {
+ // post__in used by the 2 functions below
+ // useless to filter them as output is already in the right language and would result in performance loss
+ foreach ( debug_backtrace() as $trace ) {
+ if ( in_array( $trace['function'], array( 'wp_nav_menu', 'gallery_shortcode' ) ) ) {
+ return;
+ }
+ }
+
+ foreach ( $qv[ $key ] as $p ) {
+ $arr[] = ( $tr = $this->get_post( $p ) ) ? $tr : $p;
+ }
+
+ $qv[ $key ] = $arr;
+ }
+ }
+ }
+
+ /**
+ * filters terms query to automatically translate included ids
+ *
+ * @since 1.1.1
+ *
+ * @param array $args
+ * @param array $taxonomies
+ * @return array modified $args
+ */
+ public function get_terms_args( $args, $taxonomies ) {
+ if ( ! empty( $args['include'] ) && ( empty( $taxonomies ) || $this->model->is_translated_taxonomy( $taxonomies ) ) ) {
+ foreach ( wp_parse_id_list( $args['include'] ) as $id ) {
+ $arr[] = ( $tr = $this->get_term( $id ) ) ? $tr : $id;
+ }
+
+ $args['include'] = $arr;
+ }
+ return $args;
+ }
+
+ /**
+ * translates tax queries
+ * compatible with nested tax queries introduced in WP 4.1
+ *
+ * @since 1.7
+ *
+ * @param array $tax_queries
+ * @return array translated tax queries
+ */
+ protected function translate_tax_query_recursive( $tax_queries ) {
+ foreach ( $tax_queries as $key => $q ) {
+ if ( isset( $q['taxonomy'], $q['terms'] ) && $this->model->is_translated_taxonomy( $q['taxonomy'] ) ) {
+ $arr = array();
+ $field = isset( $q['field'] ) && in_array( $q['field'], array( 'slug', 'name' ) ) ? $q['field'] : 'term_id';
+ foreach ( (array) $q['terms'] as $t ) {
+ $arr[] = ( ( $tag = wpcom_vip_get_term_by( $field, $t, $q['taxonomy'] ) ) && ( $tr_id = $this->get_term( $tag->term_id ) ) && ! is_wp_error( $tr = get_term( $tr_id, $q['taxonomy'] ) ) ) ? $tr->$field : $t;
+ }
+
+ $tax_queries[ $key ]['terms'] = $arr;
+ }
+
+ // nested queries
+ elseif ( is_array( $q ) ) {
+ $tax_queries[ $key ] = $this->translate_tax_query_recursive( $q );
+ }
+ }
+
+ return $tax_queries;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-filters-links.php b/pole-sbv-content/plugins/polylang/frontend/frontend-filters-links.php
new file mode 100644
index 00000000..6ced1e07
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/frontend-filters-links.php
@@ -0,0 +1,393 @@
+curlang = &$polylang->curlang;
+ $this->cache = new PLL_Cache();
+
+ // Rewrites author and date links to filter them by language
+ foreach ( array( 'feed_link', 'author_link', 'search_link', 'year_link', 'month_link', 'day_link' ) as $filter ) {
+ add_filter( $filter, array( $this, 'archive_link' ), 20 );
+ }
+
+ // Meta in the html head section
+ add_action( 'wp_head', array( $this, 'wp_head' ) );
+
+ // Modifies the home url
+ if ( ! defined( 'PLL_FILTER_HOME_URL' ) || PLL_FILTER_HOME_URL ) {
+ add_filter( 'home_url', array( $this, 'home_url' ), 10, 2 );
+ }
+
+ if ( $this->options['force_lang'] > 1 ) {
+ // Rewrites next and previous post links when not automatically done by WordPress
+ add_filter( 'get_pagenum_link', array( $this, 'archive_link' ), 20 );
+
+ // Rewrites ajax url
+ add_filter( 'admin_url', array( $this, 'admin_url' ), 10, 2 );
+ }
+
+ // Redirects to canonical url before WordPress redirect_canonical
+ // but after Nextgen Gallery which hacks $_SERVER['REQUEST_URI'] !!! and restores it in 'template_redirect' with priority 1
+ add_action( 'template_redirect', array( $this, 'check_canonical_url' ), 4 );
+ }
+
+ /**
+ * Modifies the author and date links to add the language parameter ( as well as feed link )
+ *
+ * @since 0.4
+ *
+ * @param string $link
+ * @return string modified link
+ */
+ public function archive_link( $link ) {
+ return $this->links_model->switch_language_in_link( $link, $this->curlang );
+ }
+
+ /**
+ * Modifies page links
+ * and caches the result
+ *
+ * @since 1.7
+ *
+ * @param string $link post link
+ * @param int $post_id post ID
+ * @return string modified post link
+ */
+ public function _get_page_link( $link, $post_id ) {
+ $sample = false !== strpos( $link, '%pagename%' ); // To avoid a conflict with plugin Custom Permalinks
+ $cache_key = "post:{$post_id}:{$sample}";
+ if ( false === $_link = $this->cache->get( $cache_key ) ) {
+ $_link = parent::_get_page_link( $link, $post_id );
+ $this->cache->set( $cache_key, $_link );
+ }
+ return $_link;
+ }
+
+ /**
+ * Modifies attachment links
+ * and caches the result
+ *
+ * @since 1.6.2
+ *
+ * @param string $link attachment link
+ * @param int $post_id attachment link
+ * @return string modified attachment link
+ */
+ public function attachment_link( $link, $post_id ) {
+ $cache_key = 'post:' . $post_id;
+ if ( false === $_link = $this->cache->get( $cache_key ) ) {
+ $_link = parent::attachment_link( $link, $post_id );
+ $this->cache->set( $cache_key, $_link );
+ }
+ return $_link;
+ }
+
+ /**
+ * Modifies custom posts links
+ * and caches the result
+ *
+ * @since 1.6
+ *
+ * @param string $link post link
+ * @param object $post post object
+ * @return string modified post link
+ */
+ public function post_type_link( $link, $post ) {
+ $sample = false !== strpos( $link, '%postname%' ); // To avoid a conflict with plugin Custom Permalinks
+ $cache_key = "post:{$post->ID}:{$sample}";
+ if ( false === $_link = $this->cache->get( $cache_key ) ) {
+ $_link = parent::post_type_link( $link, $post );
+ $this->cache->set( $cache_key, $_link );
+ }
+ return $_link;
+ }
+
+ /**
+ * Modifies filtered taxonomies ( post format like ) and translated taxonomies links
+ * and caches the result
+ *
+ * @since 0.7
+ *
+ * @param string $link
+ * @param object $term term object
+ * @param string $tax taxonomy name
+ * @return string modified link
+ */
+ public function term_link( $link, $term, $tax ) {
+ $cache_key = 'term:' . $term->term_id;
+ if ( false === $_link = $this->cache->get( $cache_key ) ) {
+ if ( in_array( $tax, $this->model->get_filtered_taxonomies() ) ) {
+ $_link = $this->links_model->switch_language_in_link( $link, $this->curlang );
+
+ /** This filter is documented in include/filters-links.php */
+ $_link = apply_filters( 'pll_term_link', $_link, $this->curlang, $term );
+ }
+
+ else {
+ $_link = parent::term_link( $link, $term, $tax );
+ }
+ $this->cache->set( $cache_key, $_link );
+ }
+ return $_link;
+ }
+
+ /**
+ * Outputs references to translated pages ( if exists ) in the html head section
+ *
+ * @since 0.1
+ */
+ public function wp_head() {
+ // Don't output anything on paged archives: see https://wordpress.org/support/topic/hreflang-on-page2
+ // Don't output anything on paged pages and paged posts
+ if ( is_paged() || ( is_singular() && ( $page = get_query_var( 'page' ) ) && $page > 1 ) ) {
+ return;
+ }
+
+ // Google recommends to include self link https://support.google.com/webmasters/answer/189077?hl=en
+ foreach ( $this->model->get_languages_list() as $language ) {
+ if ( $url = $this->links->get_translation_url( $language ) ) {
+ $urls[ $language->get_locale( 'display' ) ] = $url;
+ }
+ }
+
+ // Ouptputs the section only if there are translations ( $urls always contains self link )
+ if ( ! empty( $urls ) && count( $urls ) > 1 ) {
+
+ // Prepare the list of languages to remove the country code
+ foreach ( array_keys( $urls ) as $locale ) {
+ $split = explode( '-', $locale );
+ $languages[ $locale ] = reset( $split );
+ }
+
+ $count = array_count_values( $languages );
+
+ foreach ( $urls as $locale => $url ) {
+ $lang = $count[ $languages[ $locale ] ] > 1 ? $locale : $languages[ $locale ]; // Output the country code only when necessary
+ $hreflangs[ $lang ] = $url;
+ }
+
+ // Adds the site root url when the default language code is not hidden
+ // See https://wordpress.org/support/topic/implementation-of-hreflangx-default
+ if ( is_front_page() && ! $this->options['hide_default'] && $this->options['force_lang'] < 3 ) {
+ $hreflangs['x-default'] = home_url( '/' );
+ }
+
+ /**
+ * Filters the list of rel hreflang attributes
+ *
+ * @since 2.1
+ *
+ * @param array $hreflangs Array of urls with language codes as keys
+ */
+ $hreflangs = apply_filters( 'pll_rel_hreflang_attributes', $hreflangs );
+
+ foreach ( $hreflangs as $lang => $url ) {
+ printf( '' . "\n", esc_url( $url ), esc_attr( $lang ) );
+ }
+ }
+ }
+
+ /**
+ * Filters the home url to get the right language
+ *
+ * @since 0.4
+ *
+ * @param string $url
+ * @param string $path
+ * @return string
+ */
+ public function home_url( $url, $path ) {
+ if ( ! ( did_action( 'template_redirect' ) || did_action( 'login_init' ) ) || rtrim( $url,'/' ) != $this->links_model->home ) {
+ return $url;
+ }
+
+ static $white_list, $black_list; // Avoid evaluating this at each function call
+
+ // We *want* to filter the home url in these cases
+ if ( empty( $white_list ) ) {
+ // On Windows get_theme_root() mixes / and \
+ // We want only \ for the comparison with debug_backtrace
+ $theme_root = get_theme_root();
+ $theme_root = ( false === strpos( $theme_root, '\\' ) ) ? $theme_root : str_replace( '/', '\\', $theme_root );
+
+ /**
+ * Filter the white list of the Polylang 'home_url' filter
+ * The $args contains an array of arrays each of them having
+ * a 'file' key and/or a 'function' key to decide which functions in
+ * which files using home_url() calls must be filtered
+ *
+ * @since 1.1.2
+ *
+ * @param array $args
+ */
+ $white_list = apply_filters( 'pll_home_url_white_list', array(
+ array( 'file' => $theme_root ),
+ array( 'function' => 'wp_nav_menu' ),
+ array( 'function' => 'login_footer' ),
+ array( 'function' => 'get_custom_logo' ),
+ ) );
+ }
+
+ // We don't want to filter the home url in these cases
+ if ( empty( $black_list ) ) {
+
+ /**
+ * Filter the black list of the Polylang 'home_url' filter
+ * The $args contains an array of arrays each of them having
+ * a 'file' key and/or a 'function' key to decide which functions in
+ * which files using home_url() calls must be filtered
+ *
+ * @since 1.1.2
+ *
+ * @param array $args
+ */
+ $black_list = apply_filters( 'pll_home_url_black_list', array(
+ array( 'file' => 'searchform.php' ), // Since WP 3.6 searchform.php is passed through get_search_form
+ array( 'function' => 'get_search_form' ),
+ ) );
+ }
+
+ $traces = version_compare( PHP_VERSION, '5.2.5', '>=' ) ? debug_backtrace( false ) : debug_backtrace();
+ unset( $traces[0], $traces[1] ); // We don't need the last 2 calls: this function + call_user_func_array (or apply_filters on PHP7+)
+
+ foreach ( $traces as $trace ) {
+ // Black list first
+ foreach ( $black_list as $v ) {
+ if ( ( isset( $trace['file'], $v['file'] ) && false !== strpos( $trace['file'], $v['file'] ) ) || ( isset( $trace['function'], $v['function'] ) && $trace['function'] == $v['function'] ) ) {
+ return $url;
+ }
+ }
+
+ foreach ( $white_list as $v ) {
+ if ( ( isset( $trace['function'], $v['function'] ) && $trace['function'] == $v['function'] ) ||
+ ( isset( $trace['file'], $v['file'] ) && false !== strpos( $trace['file'], $v['file'] ) && in_array( $trace['function'], array( 'home_url', 'get_home_url', 'bloginfo', 'get_bloginfo' ) ) ) ) {
+ $ok = true;
+ }
+ }
+ }
+
+ return empty( $ok ) ? $url : ( empty( $path ) ? rtrim( $this->links->get_home_url( $this->curlang ), '/' ) : $this->links->get_home_url( $this->curlang ) );
+ }
+
+ /**
+ * Rewrites ajax url when using domains or subdomains
+ *
+ * @since 1.5
+ *
+ * @param string $url admin url with path evaluated by WordPress
+ * @param string $path admin path
+ * @return string
+ */
+ public function admin_url( $url, $path ) {
+ return 'admin-ajax.php' === $path ? $this->links_model->switch_language_in_link( $url, $this->curlang ) : $url;
+ }
+
+ /**
+ * If the language code is not in agreement with the language of the content
+ * redirects incoming links to the proper URL to avoid duplicate content
+ *
+ * @since 0.9.6
+ *
+ * @param string $requested_url optional
+ * @param bool $do_redirect optional, whether to perform the redirection or not
+ * @return string if redirect is not performed
+ */
+ public function check_canonical_url( $requested_url = '', $do_redirect = true ) {
+ global $wp_query, $post, $is_IIS;
+
+ // Don't redirect in same cases as WP
+ if ( is_trackback() || is_search() || is_admin() || is_preview() || is_robots() || ( $is_IIS && ! iis7_supports_permalinks() ) ) {
+ return;
+ }
+
+ // Don't redirect mysite.com/?attachment_id= to mysite.com/en/?attachment_id=
+ if ( 1 == $this->options['force_lang'] && is_attachment() && isset( $_GET['attachment_id'] ) ) {
+ return;
+ }
+
+ // If the default language code is not hidden and the static front page url contains the page name
+ // the customizer lands here and the code below would redirect to the list of posts
+ if ( is_customize_preview() ) {
+ return;
+ }
+
+ if ( empty( $requested_url ) ) {
+ $requested_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+ }
+
+ if ( is_single() || is_page() ) {
+ if ( isset( $post->ID ) && $this->model->is_translated_post_type( $post->post_type ) ) {
+ $language = $this->model->post->get_language( (int) $post->ID );
+ }
+ }
+
+ elseif ( is_category() || is_tag() || is_tax() ) {
+ $obj = $wp_query->get_queried_object();
+ if ( $this->model->is_translated_taxonomy( $obj->taxonomy ) ) {
+ $language = $this->model->term->get_language( (int) $obj->term_id );
+ }
+ }
+
+ elseif ( $wp_query->is_posts_page ) {
+ $obj = $wp_query->get_queried_object();
+ $language = $this->model->post->get_language( (int) $obj->ID );
+ }
+
+ elseif ( is_404() && ! empty( $wp_query->query['page_id'] ) && $id = get_query_var( 'page_id' ) ) {
+ // Special case for page shortlinks when using subdomains or multiple domains
+ // Needed because redirect_canonical doesn't accept to change the domain name
+ $language = $this->model->post->get_language( (int) $id );
+ }
+
+ if ( empty( $language ) ) {
+ $language = $this->curlang;
+ $redirect_url = $requested_url;
+ } else {
+ // First get the canonical url evaluated by WP
+ // Workaround a WP bug wich removes the port for some urls and get it back at second call to redirect_canonical
+ $_redirect_url = ( ! $_redirect_url = redirect_canonical( $requested_url, false ) ) ? $requested_url : $_redirect_url;
+ $redirect_url = ( ! $redirect_url = redirect_canonical( $_redirect_url, false ) ) ? $_redirect_url : $redirect_url;
+
+ // Then get the right language code in url
+ $redirect_url = $this->options['force_lang'] ?
+ $this->links_model->switch_language_in_link( $redirect_url, $language ) :
+ $this->links_model->remove_language_from_link( $redirect_url ); // Works only for default permalinks
+ }
+
+ /**
+ * Filters the canonical url detected by Polylang
+ *
+ * @since 1.6
+ *
+ * @param bool|string $redirect_url false or the url to redirect to
+ * @param object $language the language detected
+ */
+ $redirect_url = apply_filters( 'pll_check_canonical_url', $redirect_url, $language );
+
+ // The language is not correctly set so let's redirect to the correct url for this object
+ if ( $do_redirect && $redirect_url && $requested_url != $redirect_url ) {
+ wp_redirect( $redirect_url, 301 );
+ exit;
+ }
+
+ return $redirect_url;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-filters-search.php b/pole-sbv-content/plugins/polylang/frontend/frontend-filters-search.php
new file mode 100644
index 00000000..fa90546e
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/frontend-filters-search.php
@@ -0,0 +1,129 @@
+links_model = &$polylang->links_model;
+ $this->curlang = &$polylang->curlang;
+
+ // adds the language information in the search form
+ // low priority in case the search form is created using the same filter as described in http://codex.wordpress.org/Function_Reference/get_search_form
+ add_filter( 'get_search_form', array( $this, 'get_search_form' ), 99 );
+
+ // adds the language information in admin bar search form
+ add_action( 'add_admin_bar_menus', array( $this, 'add_admin_bar_menus' ) );
+
+ // adds javascript at the end of the document
+ // was used for WP < 3.6. kept just in case
+ if ( defined( 'PLL_SEARCH_FORM_JS' ) && PLL_SEARCH_FORM_JS ) {
+ add_action( 'wp_footer', array( $this, 'wp_print_footer_scripts' ) );
+ }
+ }
+
+ /**
+ * adds the language information in the search form
+ * does not work if searchform.php ( prior to WP 3.6 ) is used or if the search form is hardcoded in another template file
+ *
+ * @since 0.1
+ *
+ * @param string $form search form
+ * @return string modified search form
+ */
+ public function get_search_form( $form ) {
+ if ( $form ) {
+ if ( $this->links_model->using_permalinks ) {
+ // take care to modify only the url in the #', $form, $matches );
+ $old = reset( $matches );
+ $new = preg_replace( '#' . esc_url( $this->links_model->home ) . '\/?#', esc_url( $this->curlang->search_url ), $old );
+ $form = str_replace( $old, $new, $form );
+ }
+ else {
+ $form = str_replace( '', '', $form );
+ }
+ }
+
+ return $form;
+ }
+
+ /**
+ * adds the language information in admin bar search form
+ *
+ * @since 1.2
+ */
+ function add_admin_bar_menus() {
+ remove_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 4 );
+ add_action( 'admin_bar_menu', array( $this, 'admin_bar_search_menu' ), 4 );
+ }
+
+ /**
+ * rewrites the admin bar search form to pass our get_search form filter. See #21342
+ * code base is WP 4.3.1
+ *
+ * @since 0.9
+ *
+ * @param object $wp_admin_bar
+ */
+ public function admin_bar_search_menu( $wp_admin_bar ) {
+ $form = '';
+
+ $wp_admin_bar->add_menu( array(
+ 'parent' => 'top-secondary',
+ 'id' => 'search',
+ 'title' => $this->get_search_form( $form ), // pass the get_search_form filter
+ 'meta' => array( 'class' => 'admin-bar-search', 'tabindex' => -1 ),
+ ) );
+ }
+
+ /**
+ * allows modifying the search form if it does not pass get_search_form
+ *
+ * @since 0.1
+ */
+ public function wp_print_footer_scripts() {
+ // don't use directly e[0] just in case there is somewhere else an element named 's'
+ // check before if the hidden input has not already been introduced by get_search_form ( FIXME: is there a way to improve this ) ?
+ // thanks to AndyDeGroo for improving the code for compatility with old browsers
+ // http://wordpress.org/support/topic/development-of-polylang-version-08?replies=6#post-2645559
+ $lang = esc_js( $this->curlang->slug );
+ $js = "//";
+ echo '';
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-filters.php b/pole-sbv-content/plugins/polylang/frontend/frontend-filters.php
new file mode 100644
index 00000000..886c5a5d
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/frontend-filters.php
@@ -0,0 +1,381 @@
+options['media_support'] ) {
+ add_filter( 'widget_media_image_instance', array( $this, 'widget_media_instance' ), 1 ); // Since WP 4.8
+ }
+
+ // Strings translation ( must be applied before WordPress applies its default formatting filters )
+ foreach ( array( 'widget_text', 'widget_title', 'option_blogname', 'option_blogdescription', 'option_date_format', 'option_time_format' ) as $filter ) {
+ add_filter( $filter, 'pll__', 1 );
+ }
+
+ // Translates biography
+ add_filter( 'get_user_metadata', array( $this, 'get_user_metadata' ), 10, 4 );
+
+ // Set posts and terms language when created from frontend ( ex with P2 theme )
+ add_action( 'save_post', array( $this, 'save_post' ), 200, 2 );
+ add_action( 'create_term', array( $this, 'save_term' ), 10, 3 );
+ add_action( 'edit_term', array( $this, 'save_term' ), 10, 3 );
+
+ if ( $this->options['media_support'] ) {
+ add_action( 'add_attachment', array( $this, 'set_default_language' ) );
+ }
+
+ // Support theme customizer
+ // FIXME of course does not work if 'transport' is set to 'postMessage'
+ if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) {
+ add_filter( 'pre_option_blogname', 'pll__', 20 );
+ add_filter( 'pre_option_blogdescription', 'pll__', 20 );
+ }
+ }
+
+ /**
+ * Returns the locale based on current language
+ *
+ * @since 0.1
+ *
+ * @param string $locale
+ * @return string
+ */
+ public function get_locale( $locale ) {
+ return $this->curlang->locale;
+ }
+
+ /**
+ * Filters sticky posts by current language
+ *
+ * @since 0.8
+ *
+ * @param array $posts list of sticky posts ids
+ * @return array modified list of sticky posts ids
+ */
+ public function option_sticky_posts( $posts ) {
+ global $wpdb;
+
+ if ( $this->curlang && ! empty( $posts ) ) {
+ $_posts = wp_cache_get( 'sticky_posts', 'options' ); // This option is usually cached in 'all_options' by WP
+
+ if ( empty( $_posts ) || ! is_array( $_posts[ $this->curlang->term_taxonomy_id ] ) ) {
+ $posts = array_map( 'intval', $posts );
+ $posts = implode( ',', $posts );
+
+ $languages = $this->model->get_languages_list( array( 'fields' => 'term_taxonomy_id' ) );
+ $_posts = array_fill_keys( $languages, array() ); // Init with empty arrays
+ $languages = implode( ',', $languages );
+
+ $relations = $wpdb->get_results( "SELECT object_id, term_taxonomy_id FROM {$wpdb->term_relationships} WHERE object_id IN ({$posts}) AND term_taxonomy_id IN ({$languages})" );
+
+ foreach ( $relations as $relation ) {
+ $_posts[ $relation->term_taxonomy_id ][] = $relation->object_id;
+ }
+ wp_cache_add( 'sticky_posts', $_posts, 'options' );
+ }
+
+ $posts = $_posts[ $this->curlang->term_taxonomy_id ];
+ }
+
+ return $posts;
+ }
+
+ /**
+ * Adds language dependent cache domain when querying terms
+ * useful as the 'lang' parameter is not included in cache key by WordPress
+ *
+ * @since 1.3
+ *
+ * @param array $args
+ * @return array
+ */
+ public function get_terms_args( $args ) {
+ $lang = isset( $args['lang'] ) ? $args['lang'] : $this->curlang->slug;
+ $key = '_' . ( is_array( $lang ) ? implode( ',', $lang ) : $lang );
+ $args['cache_domain'] = empty( $args['cache_domain'] ) ? 'pll' . $key : $args['cache_domain'] . $key;
+ return $args;
+ }
+
+ /**
+ * Filters categories and post tags by language when needed
+ *
+ * @since 0.2
+ *
+ * @param array $clauses sql clauses
+ * @param array $taxonomies
+ * @param array $args get_terms arguments
+ * @return array modified sql clauses
+ */
+ public function terms_clauses( $clauses, $taxonomies, $args ) {
+ // Does nothing except on taxonomies which are filterable
+ // Since WP 4.7, make sure not to filter wp_get_object_terms()
+ if ( ! $this->model->is_translated_taxonomy( $taxonomies ) || ! empty( $args['object_ids'] ) ) {
+ return $clauses;
+ }
+
+ // Adds our clauses to filter by language
+ return $this->model->terms_clauses( $clauses, isset( $args['lang'] ) ? $args['lang'] : $this->curlang );
+ }
+
+ /**
+ * Modifies the sql request for wp_get_archives to filter by the current language
+ *
+ * @since 1.9
+ *
+ * @param string $sql JOIN clause
+ * @param array $r wp_get_archives arguments
+ * @return string modified JOIN clause
+ */
+ public function getarchives_join( $sql, $r ) {
+ return ! empty( $r['post_type'] ) && $this->model->is_translated_post_type( $r['post_type'] ) ? $sql . $this->model->post->join_clause() : $sql;
+ }
+
+ /**
+ * Modifies the sql request for wp_get_archives to filter by the current language
+ *
+ * @since 1.9
+ *
+ * @param string $sql WHERE clause
+ * @param array $r wp_get_archives arguments
+ * @return string modified WHERE clause
+ */
+ public function getarchives_where( $sql, $r ) {
+ return ! empty( $r['post_type'] ) && $this->model->is_translated_post_type( $r['post_type'] ) ? $sql . $this->model->post->where_clause( $this->curlang ) : $sql;
+ }
+
+ /**
+ * Modifies the sql request for get_adjacent_post to filter by the current language
+ *
+ * @since 0.1
+ *
+ * @param string $sql The JOIN clause in the SQL.
+ * @param bool $in_same_term Whether post should be in a same taxonomy term.
+ * @param array $excluded_terms Array of excluded term IDs.
+ * @param string $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true.
+ * @param WP_Post $post WP_Post object.
+ * @return string modified JOIN clause
+ */
+ public function posts_join( $sql, $in_same_term, $excluded_terms, $taxonomy = '', $post = null ) {
+ return $this->model->is_translated_post_type( $post->post_type ) ? $sql . $this->model->post->join_clause( 'p' ) : $sql;
+ }
+
+ /**
+ * Modifies the sql request for wp_get_archives and get_adjacent_post to filter by the current language
+ *
+ * @since 0.1
+ *
+ * @param string $sql The WHERE clause in the SQL.
+ * @param bool $in_same_term Whether post should be in a same taxonomy term.
+ * @param array $excluded_terms Array of excluded term IDs.
+ * @param string $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true.
+ * @param WP_Post $post WP_Post object.
+ * @return string modified WHERE clause
+ */
+ public function posts_where( $sql, $in_same_term, $excluded_terms, $taxonomy = '', $post = null ) {
+ return $this->model->is_translated_post_type( $post->post_type ) ? $sql . $this->model->post->where_clause( $this->curlang ) : $sql;
+ }
+
+ /**
+ * Filters the widgets according to the current language
+ * Don't display if a language filter is set and this is not the current one
+ *
+ * @since 0.3
+ *
+ * @param array $instance widget settings
+ * @param object $widget WP_Widget object
+ * @return bool|array false if we hide the widget, unmodified $instance otherwise
+ */
+ public function widget_display_callback( $instance, $widget ) {
+ return ! empty( $instance['pll_lang'] ) && $instance['pll_lang'] != $this->curlang->slug ? false : $instance;
+ }
+
+ /**
+ * Remove widgets from sidebars if they are not visible in the current language
+ * Needed to allow is_active_sidebar() to return false if all widgets are not for the current language. See #54
+ *
+ * @since 2.1
+ *
+ * @param array $sidebars_widgets An associative array of sidebars and their widgets
+ * @return array
+ */
+ public function sidebars_widgets( $sidebars_widgets ) {
+ global $wp_registered_widgets;
+
+ foreach ( $sidebars_widgets as $sidebar => $widgets ) {
+ if ( 'wp_inactive_widgets' == $sidebar || empty( $widgets ) ) {
+ continue;
+ }
+
+ foreach ( $widgets as $key => $widget ) {
+ // Nothing can be done if the widget is created using pre WP2.8 API :(
+ // There is no object, so we can't access it to get the widget options
+ if ( ! isset( $wp_registered_widgets[ $widget ]['callback'] ) || ! is_array( $wp_registered_widgets[ $widget ]['callback'] ) || ! isset( $wp_registered_widgets[ $widget ]['callback'][0] ) || ! is_object( $wp_registered_widgets[ $widget ]['callback'][0] ) || ! method_exists( $wp_registered_widgets[ $widget ]['callback'][0], 'get_settings' ) ) {
+ continue;
+ }
+
+ $widget_settings = $wp_registered_widgets[ $widget ]['callback'][0]->get_settings();
+ $number = $wp_registered_widgets[ $widget ]['params'][0]['number'];
+
+ // Remove the widget if not visible in the current language
+ if ( ! empty( $widget_settings[ $number ]['pll_lang'] ) && $widget_settings[ $number ]['pll_lang'] !== $this->curlang->slug ) {
+ unset( $sidebars_widgets[ $sidebar ][ $key ] );
+ }
+ }
+ }
+
+ return $sidebars_widgets;
+ }
+
+ /**
+ * Translates media in media widgets
+ *
+ * @since 2.1.5
+ *
+ * @param array $instance Widget instance data
+ * @return array
+ */
+ public function widget_media_instance( $instance ) {
+ if ( empty( $instance['pll_lang'] ) && $instance['attachment_id'] && $tr_id = pll_get_post( $instance['attachment_id'] ) ) {
+ $instance['attachment_id'] = $tr_id;
+ $attachment = get_post( $tr_id );
+
+ if ( $instance['caption'] && ! empty( $attachment->post_excerpt ) ) {
+ $instance['caption'] = $attachment->post_excerpt;
+ }
+
+ if ( $instance['alt'] && $alt_text = get_post_meta( $tr_id, '_wp_attachment_image_alt', true ) ) {
+ $instance['alt'] = $alt_text;
+ }
+
+ if ( $instance['image_title'] && ! empty( $attachment->post_title ) ) {
+ $instance['image_title'] = $attachment->post_title;
+ }
+ }
+ return $instance;
+ }
+
+ /**
+ * Translates biography
+ * Makes sure that the correct locale is used for ajax calls when the user is logged in
+ *
+ * @since 0.9
+ *
+ * @param null $return
+ * @param int $id User id
+ * @param string $meta_key
+ * @param bool $single Whether to return only the first value of the specified $meta_key
+ * @return null|string
+ */
+ public function get_user_metadata( $return, $id, $meta_key, $single ) {
+ switch ( $meta_key ) {
+ case 'description':
+ if ( $this->curlang->slug !== $this->options['default_lang'] ) {
+ $return = get_user_meta( $id, 'description_' . $this->curlang->slug, $single );
+ }
+ break;
+ case 'locale':
+ if ( Polylang::is_ajax_on_front() ) {
+ $return = get_locale();
+ }
+ break;
+ }
+
+ return $return;
+ }
+
+ /**
+ * Allows to set a language by default for posts if it has no language yet
+ *
+ * @since 1.5.4
+ *
+ * @param int $post_id
+ */
+ public function set_default_language( $post_id ) {
+ if ( ! $this->model->post->get_language( $post_id ) ) {
+ if ( isset( $_REQUEST['lang'] ) ) {
+ $this->model->post->set_language( $post_id, $_REQUEST['lang'] );
+ } elseif ( ( $parent_id = wp_get_post_parent_id( $post_id ) ) && $parent_lang = $this->model->post->get_language( $parent_id ) ) {
+ $this->model->post->set_language( $post_id, $parent_lang );
+ } else {
+ $this->model->post->set_language( $post_id, $this->curlang );
+ }
+ }
+ }
+
+ /**
+ * Called when a post ( or page ) is saved, published or updated
+ * Does nothing except on post types which are filterable
+ * Sets the language but does not allow to modify it
+ *
+ * @since 1.1
+ *
+ * @param int $post_id
+ * @param object $post
+ */
+ public function save_post( $post_id, $post ) {
+ if ( $this->model->is_translated_post_type( $post->post_type ) ) {
+ $this->set_default_language( $post_id );
+ }
+ }
+
+ /**
+ * Called when a category or post tag is created or edited
+ * Does nothing except on taxonomies which are filterable
+ * Sets the language but does not allow to modify it
+ *
+ * @since 1.1
+ *
+ * @param int $term_id
+ * @param int $tt_id Term taxonomy id
+ * @param string $taxonomy
+ */
+ public function save_term( $term_id, $tt_id, $taxonomy ) {
+ if ( $this->model->is_translated_taxonomy( $taxonomy ) && ! $this->model->term->get_language( $term_id ) ) {
+ if ( isset( $_REQUEST['lang'] ) ) {
+ $this->model->term->set_language( $term_id, $_REQUEST['lang'] );
+ } elseif ( ( $term = get_term( $term_id, $taxonomy ) ) && ! empty( $term->parent ) && $parent_lang = $this->model->term->get_language( $term->parent ) ) {
+ $this->model->term->set_language( $term_id, $parent_lang );
+ } else {
+ $this->model->term->set_language( $term_id, $this->curlang );
+ }
+ }
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-links.php b/pole-sbv-content/plugins/polylang/frontend/frontend-links.php
new file mode 100644
index 00000000..866ba88c
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/frontend-links.php
@@ -0,0 +1,209 @@
+curlang = &$polylang->curlang;
+ $this->cache = new PLL_Cache();
+
+ }
+
+ /**
+ * Returns the url of the translation ( if exists ) of the current page
+ *
+ * @since 0.1
+ *
+ * @param object $language
+ * @return string
+ */
+ public function get_translation_url( $language ) {
+ global $wp_query;
+
+ if ( false !== $translation_url = $this->cache->get( 'translation_url:' . $language->slug ) ) {
+ return $translation_url;
+ }
+
+ // Make sure that we have the queried object
+ // See https://wordpress.org/support/topic/patch-for-fixing-a-notice
+ $queried_object_id = $wp_query->get_queried_object_id();
+
+ /**
+ * Filter the translation url before Polylang attempts to find one
+ * Internally used by Polylang for the static front page and posts page
+ *
+ * @since 1.8
+ *
+ * @param string $url Empty or the url of the translation of teh current page
+ * @param object $language Language of the translation
+ * @param int $queried_object_id Queried object id
+ */
+ if ( ! $url = apply_filters( 'pll_pre_translation_url', '', $language, $queried_object_id ) ) {
+ $qv = $wp_query->query_vars;
+ $hide = $this->options['default_lang'] == $language->slug && $this->options['hide_default'];
+
+ // Post and attachment
+ if ( is_single() && ( $this->options['media_support'] || ! is_attachment() ) && ( $id = $this->model->post->get( $queried_object_id, $language ) ) && $this->current_user_can_read( $id ) ) {
+ $url = get_permalink( $id );
+ }
+
+ // Page
+ elseif ( is_page() && ( $id = $this->model->post->get( $queried_object_id, $language ) ) && $this->current_user_can_read( $id ) ) {
+ $url = get_page_link( $id );
+ }
+
+ elseif ( is_search() ) {
+ $url = $this->get_archive_url( $language );
+
+ // Special case for search filtered by translated taxonomies: taxonomy terms are translated in the translation url
+ if ( ! empty( $wp_query->tax_query->queries ) ) {
+ foreach ( $wp_query->tax_query->queries as $tax_query ) {
+ if ( ! empty( $tax_query['taxonomy'] ) && $this->model->is_translated_taxonomy( $tax_query['taxonomy'] ) ) {
+
+ $tax = get_taxonomy( $tax_query['taxonomy'] );
+ $terms = get_terms( $tax->name, array( 'fields' => 'id=>slug' ) ); // Filtered by current language
+
+ foreach ( $tax_query['terms'] as $slug ) {
+ $term_id = array_search( $slug, $terms ); // What is the term_id corresponding to taxonomy term?
+ if ( $term_id && $term_id = $this->model->term->get_translation( $term_id, $language ) ) { // Get the translated term_id
+ $term = get_term( $term_id, $tax->name );
+ $url = str_replace( $slug, $term->slug, $url );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Translated taxonomy
+ // Take care that is_tax() is false for categories and tags
+ elseif ( ( is_category() || is_tag() || is_tax() ) && ( $term = get_queried_object() ) && $this->model->is_translated_taxonomy( $term->taxonomy ) ) {
+ $lang = $this->model->term->get_language( $term->term_id );
+
+ if ( ! $lang || $language->slug == $lang->slug ) {
+ $url = wpcom_vip_get_term_link( $term, $term->taxonomy ); // Self link
+ }
+
+ elseif ( $tr_id = $this->model->term->get_translation( $term->term_id, $language ) ) {
+ if ( $tr_term = get_term( $tr_id, $term->taxonomy ) ) {
+ // Check if translated term ( or children ) have posts
+ $count = $tr_term->count || ( is_taxonomy_hierarchical( $term->taxonomy ) && array_sum( wp_list_pluck( get_terms( $term->taxonomy, array( 'child_of' => $tr_term->term_id, 'lang' => $language->slug ) ), 'count' ) ) );
+
+ /**
+ * Filter whether to hide an archive translation url
+ *
+ * @since 2.2.4
+ *
+ * @param bool $hide True to hide the translation url.
+ * defaults to true when the translated archive is empty, false otherwise.
+ * @param string $lang The language code of the translation
+ * @param array $args Arguments used to evaluated the number of posts in the archive
+ */
+ if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count , $language->slug, array( 'taxonomy' => $term->taxonomy ) ) ) {
+ $url = wpcom_vip_get_term_link( $tr_term, $term->taxonomy );
+ }
+ }
+ }
+ }
+
+ // Post type archive
+ elseif ( is_post_type_archive() ) {
+ if ( $this->model->is_translated_post_type( $qv['post_type'] ) ) {
+ $args = array( 'post_type' => $qv['post_type'] );
+ $count = $this->model->count_posts( $language, $args );
+
+ /** This filter is documented in frontend/frontend-links.php */
+ if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count , $language->slug, $args ) ) {
+ $url = $this->get_archive_url( $language );
+ }
+ }
+ }
+
+ // Other archives
+ elseif ( is_archive() ) {
+ $keys = array( 'post_type', 'm', 'year', 'monthnum', 'day', 'author', 'author_name' );
+ $keys = array_merge( $keys, $this->model->get_filtered_taxonomies_query_vars() );
+ $args = array_intersect_key( $qv, array_flip( $keys ) );
+ $count = $this->model->count_posts( $language, $args );
+
+ /** This filter is documented in frontend/frontend-links.php */
+ if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count , $language->slug, $args ) ) {
+ $url = $this->get_archive_url( $language );
+ }
+ }
+
+ // Front page when it is the list of posts
+ elseif ( is_front_page() ) {
+ $url = $this->get_home_url( $language );
+ }
+ }
+
+ /**
+ * Filter the translation url of the current page before Polylang caches it
+ *
+ * @since 1.1.2
+ *
+ * @param null|string $url The translation url, null if none was found
+ * @param string $language The language code of the translation
+ */
+ $translation_url = apply_filters( 'pll_translation_url', ( isset( $url ) && ! is_wp_error( $url ) ? $url : null ), $language->slug );
+ $this->cache->set( 'translation_url:' . $language->slug, $translation_url );
+ return $translation_url;
+ }
+
+ /**
+ * Get the translation of the current archive url
+ * used also for search
+ *
+ * @since 1.2
+ *
+ * @param object $language
+ * @return string
+ */
+ public function get_archive_url( $language ) {
+ $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+ $url = $this->links_model->switch_language_in_link( $url, $language );
+ $url = $this->links_model->remove_paged_from_link( $url );
+
+ /**
+ * Filter the archive url
+ *
+ * @since 1.6
+ *
+ * @param string $url Url of the archive
+ * @param object $language Language of the archive
+ */
+ return apply_filters( 'pll_get_archive_url', $url, $language );
+ }
+
+ /**
+ * Returns the home url in the right language
+ *
+ * @since 0.1
+ *
+ * @param object $language Optional, defaults to current language
+ * @param bool $is_search Optional, whether we need the home url for a search form, defaults to false
+ */
+ public function get_home_url( $language = '', $is_search = false ) {
+ if ( empty( $language ) ) {
+ $language = $this->curlang;
+ }
+
+ return parent::get_home_url( $language, $is_search );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-nav-menu.php b/pole-sbv-content/plugins/polylang/frontend/frontend-nav-menu.php
new file mode 100644
index 00000000..9cec1d1a
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/frontend-nav-menu.php
@@ -0,0 +1,297 @@
+curlang = &$polylang->curlang;
+
+ // Split the language switcher menu item in several language menu items
+ add_filter( 'wp_get_nav_menu_items', array( $this, 'wp_get_nav_menu_items' ), 20 ); // after the customizer menus
+ add_filter( 'wp_nav_menu_objects', array( $this, 'wp_nav_menu_objects' ) );
+ add_filter( 'nav_menu_link_attributes', array( $this, 'nav_menu_link_attributes' ), 10, 2 );
+
+ // Filters menus by language
+ add_filter( 'theme_mod_nav_menu_locations', array( $this, 'nav_menu_locations' ), 20 );
+ add_filter( 'wp_nav_menu_args', array( $this, 'wp_nav_menu_args' ) );
+
+ // The customizer
+ if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) {
+ add_filter( 'wp_nav_menu_args', array( $this, 'filter_args_before_customizer' ) );
+ add_filter( 'wp_nav_menu_args', array( $this, 'filter_args_after_customizer' ), 2000 );
+ }
+ }
+
+ /**
+ * Sort menu items by menu order
+ *
+ * @since 1.7.9
+ *
+ * @param object $a The first object to compare
+ * @param object $b The second object to compare
+ * @return int -1 or 1 if $a is considered to be respectively less than or greater than $b.
+ */
+ protected function usort_menu_items( $a, $b ) {
+ return ( $a->menu_order < $b->menu_order ) ? -1 : 1;
+ }
+
+ /**
+ * Splits the one item of backend in several items on frontend
+ * take care to menu_order as it is used later in wp_nav_menu
+ *
+ * @since 1.1.1
+ *
+ * @param array $items menu items
+ * @return array modified items
+ */
+ public function wp_get_nav_menu_items( $items ) {
+ if ( doing_action( 'customize_register' ) ) { // needed since WP 4.3, doing_action available since WP 3.9
+ return $items;
+ }
+
+ // The customizer menus does not sort the items and we need them to be sorted before splitting the language switcher
+ usort( $items, array( $this, 'usort_menu_items' ) );
+
+ $new_items = array();
+ $offset = 0;
+
+ foreach ( $items as $key => $item ) {
+ if ( $options = get_post_meta( $item->ID, '_pll_menu_item', true ) ) {
+ $i = 0;
+
+ $switcher = new PLL_Switcher;
+ $args = array_merge( array( 'raw' => 1 ), $options );
+ $the_languages = $switcher->the_languages( PLL()->links, $args );
+
+ // parent item for dropdown
+ if ( ! empty( $options['dropdown'] ) ) {
+ $item->title = $options['show_flags'] && $options['show_names'] ? $this->curlang->flag . ' ' . esc_html( $this->curlang->name ) : ( $options['show_flags'] ? $this->curlang->flag : esc_html( $this->curlang->name ) );
+ $item->attr_title = '';
+ $item->classes = array( 'pll-parent-menu-item' );
+ $new_items[] = $item;
+ $offset++;
+ }
+
+ foreach ( $the_languages as $lang ) {
+ $lang_item = clone $item;
+ $lang_item->ID = $lang_item->ID . '-' . $lang['slug']; // A unique ID
+ $lang_item->title = $options['show_flags'] && $options['show_names'] ? $lang['flag'] . '' . esc_html( $lang['name'] ) . '' : ( $options['show_flags'] ? $lang['flag'] : esc_html( $lang['name'] ) );
+ $lang_item->attr_title = '';
+ $lang_item->url = $lang['url'];
+ $lang_item->lang = $lang['locale']; // Save this for use in nav_menu_link_attributes
+ $lang_item->classes = $lang['classes'];
+ $lang_item->menu_order += $offset + $i++;
+ if ( ! empty( $options['dropdown'] ) ) {
+ $lang_item->menu_item_parent = $item->db_id;
+ $lang_item->db_id = 0; // to avoid recursion
+ }
+ $new_items[] = $lang_item;
+ }
+ $offset += $i - 1;
+ } else {
+ $item->menu_order += $offset;
+ $new_items[] = $item;
+ }
+ }
+ return $new_items;
+ }
+
+ /**
+ * Returns the ancestors of a menu item
+ *
+ * @since 1.1.1
+ *
+ * @param object $item
+ * @return array ancestors ids
+ */
+ public function get_ancestors( $item ) {
+ $ids = array();
+ $_anc_id = (int) $item->db_id;
+ while ( ( $_anc_id = get_post_meta( $_anc_id, '_menu_item_menu_item_parent', true ) ) && ! in_array( $_anc_id, $ids ) ) {
+ $ids[] = $_anc_id;
+ }
+ return $ids;
+ }
+
+ /**
+ * Removes current-menu and current-menu-ancestor classes to lang switcher when not on the home page
+ *
+ * @since 1.1.1
+ *
+ * @param array $items
+ * @return array modified menu items
+ */
+ public function wp_nav_menu_objects( $items ) {
+ $r_ids = $k_ids = array();
+
+ foreach ( $items as $item ) {
+ if ( ! empty( $item->classes ) && is_array( $item->classes ) ) {
+ if ( in_array( 'current-lang', $item->classes ) ) {
+ $item->current = false;
+ $item->classes = array_diff( $item->classes, array( 'current-menu-item' ) );
+ $r_ids = array_merge( $r_ids, $this->get_ancestors( $item ) ); // Remove the classes for these ancestors
+ } elseif ( in_array( 'current-menu-item', $item->classes ) ) {
+ $k_ids = array_merge( $k_ids, $this->get_ancestors( $item ) ); // Keep the classes for these ancestors
+ }
+ }
+ }
+
+ $r_ids = array_diff( $r_ids, $k_ids );
+
+ foreach ( $items as $item ) {
+ if ( ! empty( $item->db_id ) && in_array( $item->db_id, $r_ids ) ) {
+ $item->classes = array_diff( $item->classes, array( 'current-menu-ancestor', 'current-menu-parent', 'current_page_parent', 'current_page_ancestor' ) );
+ }
+ }
+
+ return $items;
+ }
+
+ /**
+ * Adds hreflang attribute for the language switcher menu items
+ * available since WP 3.6
+ *
+ * @since 1.1
+ *
+ * @param array $atts
+ * @param object $item
+ * @return array modified $atts
+ */
+ public function nav_menu_link_attributes( $atts, $item ) {
+ if ( isset( $item->lang ) ) {
+ $atts['lang'] = $atts['hreflang'] = esc_attr( $item->lang );
+ }
+ return $atts;
+ }
+
+ /**
+ * Fills the theme nav menus locations with the right menu in the right language
+ * Needs to wait for the language to be defined
+ *
+ * @since 1.2
+ *
+ * @param array|bool $menus list of nav menus locations, false if menu locations have not been filled yet
+ * @return array|bool modified list of nav menus locations
+ */
+ public function nav_menu_locations( $menus ) {
+ if ( is_array( $menus ) && ! empty( $this->curlang ) ) {
+ // First get multilingual menu locations from DB
+ $theme = get_option( 'stylesheet' );
+
+ foreach ( $menus as $loc => $menu ) {
+ $menus[ $loc ] = empty( $this->options['nav_menus'][ $theme ][ $loc ][ $this->curlang->slug ] ) ? 0 : $this->options['nav_menus'][ $theme ][ $loc ][ $this->curlang->slug ];
+ }
+
+ // Support for theme customizer
+ // Let's look for multilingual menu locations directly in $_POST as there are not in customizer object
+ if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) {
+ $customized = json_decode( wp_unslash( $_POST['customized'] ) );
+
+ if ( is_object( $customized ) ) {
+ foreach ( $customized as $key => $c ) {
+ if ( false !== strpos( $key, 'nav_menu_locations[' ) ) {
+ $loc = substr( trim( $key, ']' ), 19 );
+ $infos = $this->explode_location( $loc );
+ if ( $infos['lang'] == $this->curlang->slug ) {
+ $menus[ $infos['location'] ] = $c;
+ } elseif ( $this->curlang->slug == $this->options['default_lang'] ) {
+ $menus[ $loc ] = $c;
+ }
+ }
+ }
+ }
+ }
+ }
+ return $menus;
+ }
+
+ /**
+ * Attempt to translate the nav menu when it is hardcoded or when no location is defined in wp_nav_menu
+ *
+ * @since 1.7.10
+ *
+ * @param array $args
+ * @return array modified $args
+ */
+ public function wp_nav_menu_args( $args ) {
+ $theme = get_option( 'stylesheet' );
+
+ if ( empty( $this->curlang ) || empty( $this->options['nav_menus'][ $theme ] ) ) {
+ return $args;
+ }
+
+ // Get the nav menu based on the requested menu
+ $menu = wp_get_nav_menu_object( $args['menu'] );
+
+ // Attempt to find a translation of this menu
+ // This obviously does not work if the nav menu has no associated theme location
+ if ( $menu ) {
+ foreach ( $this->options['nav_menus'][ $theme ] as $menus ) {
+ if ( in_array( $menu->term_id, $menus ) && ! empty( $menus[ $this->curlang->slug ] ) ) {
+ $args['menu'] = $menus[ $this->curlang->slug ];
+ return $args;
+ }
+ }
+ }
+
+ // Get the first menu that has items and and is in the current language if we still can't find a menu
+ if ( ! $menu && ! $args['theme_location'] ) {
+ $menus = wp_get_nav_menus();
+ foreach ( $menus as $menu_maybe ) {
+ if ( $menu_items = wp_get_nav_menu_items( $menu_maybe->term_id, array( 'update_post_term_cache' => false ) ) ) {
+ foreach ( $this->options['nav_menus'][ $theme ] as $menus ) {
+ if ( in_array( $menu_maybe->term_id, $menus ) && ! empty( $menus[ $this->curlang->slug ] ) ) {
+ $args['menu'] = $menus[ $this->curlang->slug ];
+ return $args;
+ }
+ }
+ }
+ }
+ }
+
+ return $args;
+ }
+
+ /**
+ * Filters the nav menu location before the customizer so that it matches the temporary location in the customizer
+ *
+ * @since 1.8
+ *
+ * @param array $args wp_nav_menu $args
+ * @return array modified $args
+ */
+ public function filter_args_before_customizer( $args ) {
+ if ( ! empty( $this->curlang ) ) {
+ $args['theme_location'] = $this->combine_location( $args['theme_location'], $this->curlang );
+ }
+ return $args;
+ }
+
+ /**
+ * Filters the nav menu location after the customizer to get back the true nav menu location for the theme
+ *
+ * @since 1.8
+ *
+ * @param array $args wp_nav_menu $args
+ * @return array modified $args
+ */
+ public function filter_args_after_customizer( $args ) {
+ $infos = $this->explode_location( $args['theme_location'] );
+ $args['theme_location'] = $infos['location'];
+ return $args;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-static-pages.php b/pole-sbv-content/plugins/polylang/frontend/frontend-static-pages.php
new file mode 100644
index 00000000..7adf2e41
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/frontend-static-pages.php
@@ -0,0 +1,267 @@
+links_model = &$polylang->links_model;
+ $this->links = &$polylang->links;
+
+ add_action( 'pll_language_defined', array( $this, 'pll_language_defined' ) );
+ add_action( 'pll_home_requested', array( $this, 'pll_home_requested' ) );
+
+ // Manages the redirection of the homepage
+ add_filter( 'redirect_canonical', array( $this, 'redirect_canonical' ), 10, 2 );
+
+ add_filter( 'pll_pre_translation_url', array( $this, 'pll_pre_translation_url' ), 10, 3 );
+ add_filter( 'pll_check_canonical_url', array( $this, 'pll_check_canonical_url' ) );
+
+ add_filter( 'pll_set_language_from_query', array( $this, 'page_on_front_query' ), 10, 2 );
+ add_filter( 'pll_set_language_from_query', array( $this, 'page_for_posts_query' ), 10, 2 );
+ }
+
+ /**
+ * Init the filters
+ *
+ * @since 1.8
+ */
+ public function pll_language_defined() {
+ // Translates our page on front and page for posts properties
+ $this->init();
+
+ // Translates page for posts and page on front
+ add_filter( 'option_page_on_front', array( $this, 'translate_page_on_front' ) );
+ add_filter( 'option_page_for_posts', array( $this, 'translate_page_for_posts' ) );
+
+ // Support theme customizer
+ if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) {
+ add_filter( 'pre_option_page_on_front', 'pll_get_post', 20 );
+ add_filter( 'pre_option_page_for_post', 'pll_get_post', 20 );
+ }
+ }
+
+ /**
+ * Translates the page_id query var when the site root page is requested
+ *
+ * @since 1.8
+ */
+ public function pll_home_requested() {
+ set_query_var( 'page_id', $this->curlang->page_on_front );
+ }
+
+ /**
+ * Translates page on front
+ *
+ * @since 1.8
+ *
+ * @param int $v page on front page id
+ * @return int
+ */
+ public function translate_page_on_front( $v ) {
+ // returns the current page if there is no translation to avoid ugly notices
+ return isset( $this->curlang->page_on_front ) ? $this->curlang->page_on_front : $v;
+ }
+
+ /**
+ * Manages canonical redirection of the homepage when using page on front
+ *
+ * @since 0.1
+ *
+ * @param string $redirect_url
+ * @param string $requested_url
+ * @return bool|string modified url, false if redirection is canceled
+ */
+ public function redirect_canonical( $redirect_url, $requested_url ) {
+ global $wp_query;
+ if ( is_page() && ! is_feed() && isset( $wp_query->queried_object ) && $wp_query->queried_object->ID == $this->curlang->page_on_front ) {
+ $url = is_paged() ? $this->links_model->add_paged_to_link( $this->links->get_home_url(), $wp_query->query_vars['page'] ) : $this->links->get_home_url();
+
+ // Don't forget additional query vars
+ $query = parse_url( $redirect_url, PHP_URL_QUERY );
+ if ( ! empty( $query ) ) {
+ parse_str( $query, $query_vars );
+ $query_vars = rawurlencode_deep( $query_vars ); // WP encodes query vars values
+ $url = add_query_arg( $query_vars, $url );
+ }
+
+ return $url;
+ }
+
+ return $redirect_url;
+ }
+
+ /**
+ * Translates the url of the page on front and page for posts
+ *
+ * @since 1.8
+ *
+ * @param string $url not used
+ * @param object $language language in which we want the translation
+ * @param int $queried_object_id id of the queried object
+ * @return string
+ */
+ public function pll_pre_translation_url( $url, $language, $queried_object_id ) {
+ if ( ! empty( $queried_object_id ) ) {
+ // Page for posts
+ if ( $GLOBALS['wp_query']->is_posts_page && ( $id = $this->model->post->get( $queried_object_id, $language ) ) ) {
+ $url = get_permalink( $id );
+ }
+
+ // Page on front
+ elseif ( is_front_page() && $language->page_on_front && ( $language->page_on_front == $this->model->post->get( $queried_object_id, $language ) ) ) {
+ $url = $language->home_url;
+ }
+ }
+
+ return $url;
+ }
+
+ /**
+ * Handles canonical redirection if we are on a static front page
+ *
+ * @since 1.8
+ *
+ * @param string $redirect_url
+ * @return bool|string
+ */
+ public function pll_check_canonical_url( $redirect_url ) {
+ if ( ! empty( $this->curlang->page_on_front ) && is_page( $this->curlang->page_on_front ) ) {
+ // Redirect www.mysite.fr to mysite.fr
+ if ( 3 === $this->options['force_lang'] ) {
+ foreach ( $this->options['domains'] as $lang => $domain ) {
+ $host = parse_url( $domain, PHP_URL_HOST );
+ if ( 'www.' . $_SERVER['HTTP_HOST'] === $host || 'www.' . $host === $_SERVER['HTTP_HOST'] ) {
+ $language = $this->model->get_language( $lang );
+ return $language->home_url;
+ }
+ }
+ }
+
+ // Prevents canonical redirection made by WP from secondary language to main language
+ if ( $this->options['redirect_lang'] ) {
+ return false;
+ }
+ }
+ return $redirect_url;
+ }
+
+ /**
+ * Setups query vars when requesting a static front page
+ *
+ * @since 1.8
+ *
+ * @param bool|object $lang
+ * @param object $query
+ * @return bool|object
+ */
+ public function page_on_front_query( $lang, $query ) {
+ if ( ! empty( $lang ) || ! $this->page_on_front ) {
+ return $lang;
+ }
+
+ // The home page is requested
+ if ( did_action( 'home_requested' ) ) {
+ $query->set( 'page_id', $lang->page_on_front );
+ }
+
+ // Redirect the language page to the homepage when using a static front page
+ elseif ( ( $this->options['redirect_lang'] || $this->options['hide_default'] ) && ( count( $query->query ) == 1 || ( ( is_preview() || is_paged() || ! empty( $query->query['page'] ) ) && count( $query->query ) == 2 ) || ( ( is_preview() && ( is_paged() || ! empty( $query->query['page'] ) ) ) && count( $query->query ) == 3 ) ) && is_tax( 'language' ) ) {
+ $lang = $this->model->get_language( get_query_var( 'lang' ) );
+ $query->set( 'page_id', $lang->page_on_front );
+ $query->is_singular = $query->is_page = true;
+ $query->is_archive = $query->is_tax = false;
+ unset( $query->query_vars['lang'], $query->queried_object ); // Reset queried object
+ }
+
+ // Fix paged static front page in plain permalinks when Settings > Reading doesn't match the default language
+ elseif ( ! $this->links_model->using_permalinks && count( $query->query ) === 1 && ! empty( $query->query['page'] ) ) {
+ $lang = $this->model->get_language( $this->options['default_lang'] );
+ $query->set( 'page_id', $lang->page_on_front );
+ $query->is_singular = $query->is_page = true;
+ $query->is_archive = $query->is_tax = false;
+ unset( $query->query_vars['lang'], $query->queried_object ); // Reset queried object
+ }
+
+ // Set the language when requesting a static front page
+ else {
+ $page_id = $this->get_page_id( $query );
+ $languages = $this->model->get_languages_list();
+ $pages = wp_list_pluck( $languages, 'page_on_front' );
+
+ if ( ! empty( $page_id ) && false !== $n = array_search( $page_id, $pages ) ) {
+ $lang = $languages[ $n ];
+ }
+ }
+
+ // Fix for page_on_front
+ if ( ( $this->options['force_lang'] < 2 || ! $this->options['redirect_lang'] ) && $this->links_model->using_permalinks && ! empty( $lang ) && isset( $query->query['paged'] ) ) {
+ $query->set( 'page', $query->query['paged'] );
+ unset( $query->query['paged'] );
+ } elseif ( ! $this->links_model->using_permalinks && ! empty( $query->query['page'] ) ) {
+ $query->is_paged = true;
+ }
+
+ return $lang;
+ }
+
+ /**
+ * Setups query vars when requesting a posts page
+ *
+ * @since 1.8
+ *
+ * @param bool|object $lang
+ * @param object $query
+ * @return bool|object
+ */
+ public function page_for_posts_query( $lang, $query ) {
+ if ( empty( $lang ) && $this->page_for_posts ) {
+ $page_id = $this->get_page_id( $query );
+
+ if ( ! empty( $page_id ) && in_array( $page_id, $pages = $this->model->get_languages_list( array( 'fields' => 'page_for_posts' ) ) ) ) {
+ // Fill the cache with all pages for posts to avoid one query per page later
+ // The posts_per_page limit is a trick to avoid splitting the query
+ get_posts( array( 'posts_per_page' => 999, 'post_type' => 'page', 'post__in' => $pages, 'lang' => '' ) );
+
+ $lang = $this->model->post->get_language( $page_id );
+ $query->is_singular = $query->is_page = false;
+ $query->is_home = $query->is_posts_page = true;
+ }
+ }
+ return $lang;
+ }
+
+ /**
+ * Get queried page_id ( if exists )
+ * If permalinks are used, WordPress does set and use $query->queried_object_id and sets $query->query_vars['page_id'] to 0
+ * and does set and use $query->query_vars['page_id'] if permalinks are not used :(
+ *
+ * @since 1.5
+ *
+ * @param object $query instance of WP_Query
+ * @return int page_id
+ */
+ protected function get_page_id( $query ) {
+ if ( ! empty( $query->query_vars['pagename'] ) && isset( $query->queried_object_id ) ) {
+ return $query->queried_object_id;
+ }
+
+ if ( isset( $query->query_vars['page_id'] ) ) {
+ return $query->query_vars['page_id'];
+ }
+
+ return 0; // No page queried
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend.php b/pole-sbv-content/plugins/polylang/frontend/frontend.php
new file mode 100644
index 00000000..60b3a83c
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/frontend/frontend.php
@@ -0,0 +1,185 @@
+ inherited, reference to Polylang options array
+ * model => inherited, reference to PLL_Model object
+ * links_model => inherited, reference to PLL_Links_Model object
+ * links => reference to PLL_Links object
+ * static_pages => reference to PLL_Frontend_Static_Pages object
+ * filters_links => inherited, reference to PLL_Frontend_Filters_Links object
+ * choose_lang => reference to PLL_Choose_lang object
+ * curlang => current language
+ * filters => reference to PLL_Filters object
+ * filters_search => reference to PLL_Frontend_Filters_Search object
+ * nav_menu => reference to PLL_Frontend_Nav_Menu object
+ * auto_translate => optional, reference to PLL_Auto_Translate object
+ *
+ * @since 1.2
+ */
+class PLL_Frontend extends PLL_Base {
+ public $curlang;
+ public $links, $choose_lang, $filters, $filters_search, $nav_menu, $auto_translate;
+
+ /**
+ * constructor
+ *
+ * @since 1.2
+ *
+ * @param object $links_model
+ */
+ public function __construct( &$links_model ) {
+ parent::__construct( $links_model );
+
+ add_action( 'pll_language_defined', array( $this, 'pll_language_defined' ), 1 );
+
+ // avoids the language being the queried object when querying multiple taxonomies
+ add_action( 'parse_tax_query', array( $this, 'parse_tax_query' ), 1 );
+
+ // filters posts by language
+ add_action( 'parse_query', array( $this, 'parse_query' ), 6 );
+
+ // not before 'check_canonical_url'
+ if ( ! defined( 'PLL_AUTO_TRANSLATE' ) || PLL_AUTO_TRANSLATE ) {
+ add_action( 'template_redirect', array( $this, 'auto_translate' ), 7 );
+ }
+ }
+
+ /**
+ * setups the language chooser based on options
+ *
+ * @since 1.2
+ */
+ public function init() {
+ $this->links = new PLL_Frontend_Links( $this );
+
+ // Static front page and page for posts
+ if ( 'page' === get_option( 'show_on_front' ) ) {
+ $this->static_pages = new PLL_Frontend_Static_Pages( $this );
+ }
+
+ // setup the language chooser
+ $c = array( 'Content', 'Url', 'Url', 'Domain' );
+ $class = 'PLL_Choose_Lang_' . $c[ $this->options['force_lang'] ];
+ $this->choose_lang = new $class( $this );
+ $this->choose_lang->init();
+
+ // need to load nav menu class early to correctly define the locations in the customizer when the language is set from the content
+ $this->nav_menu = new PLL_Frontend_Nav_Menu( $this );
+ }
+
+ /**
+ * setups filters and nav menus once the language has been defined
+ *
+ * @since 1.2
+ */
+ public function pll_language_defined() {
+ // filters
+ $this->filters_links = new PLL_Frontend_Filters_Links( $this );
+ $this->filters = new PLL_Frontend_Filters( $this );
+ $this->filters_search = new PLL_Frontend_Filters_Search( $this );
+
+ // Auto translate for Ajax
+ if ( ( ! defined( 'PLL_AUTO_TRANSLATE' ) || PLL_AUTO_TRANSLATE ) && wp_doing_ajax() ) {
+ $this->auto_translate();
+ }
+ }
+
+ /**
+ * when querying multiple taxonomies, makes sure that the language is not the queried object
+ *
+ * @since 1.8
+ *
+ * @param object $query WP_Query object
+ */
+ public function parse_tax_query( $query ) {
+ $pll_query = new PLL_Query( $query, $this->model );
+ $queried_taxonomies = $pll_query->get_queried_taxonomies();
+
+ if ( ! empty( $queried_taxonomies ) && 'language' == reset( $queried_taxonomies ) ) {
+ $query->tax_query->queried_terms['language'] = array_shift( $query->tax_query->queried_terms );
+ }
+ }
+
+ /**
+ * modifies some query vars to "hide" that the language is a taxonomy and avoid conflicts
+ *
+ * @since 1.2
+ *
+ * @param object $query WP_Query object
+ */
+ public function parse_query( $query ) {
+ $qv = $query->query_vars;
+ $pll_query = new PLL_Query( $query, $this->model );
+ $taxonomies = $pll_query->get_queried_taxonomies();
+
+ // Allow filtering recent posts and secondary queries by the current language
+ if ( ! empty( $this->curlang ) ) {
+ $pll_query->filter_query( $this->curlang );
+ }
+
+ // modifies query vars when the language is queried
+ if ( ! empty( $qv['lang'] ) || ( ! empty( $taxonomies ) && array( 'language' ) == array_values( $taxonomies ) ) ) {
+ // do we query a custom taxonomy?
+ $taxonomies = array_diff( $taxonomies , array( 'language', 'category', 'post_tag' ) );
+
+ // remove pages query when the language is set unless we do a search
+ // take care not to break the single page, attachment and taxonomies queries!
+ if ( empty( $qv['post_type'] ) && ! $query->is_search && ! $query->is_page && ! $query->is_attachment && empty( $taxonomies ) ) {
+ $query->set( 'post_type', 'post' );
+ }
+
+ // unset the is_archive flag for language pages to prevent loading the archive template
+ // keep archive flag for comment feed otherwise the language filter does not work
+ if ( empty( $taxonomies ) && ! $query->is_comment_feed && ! $query->is_post_type_archive && ! $query->is_date && ! $query->is_author && ! $query->is_category && ! $query->is_tag ) {
+ $query->is_archive = false;
+ }
+
+ // unset the is_tax flag except if another custom tax is queried
+ if ( empty( $taxonomies ) && ($query->is_category || $query->is_tag || $query->is_author || $query->is_post_type_archive || $query->is_date || $query->is_search || $query->is_feed ) ) {
+ $query->is_tax = false;
+ unset( $query->queried_object ); // FIXME useless?
+ }
+ }
+ }
+
+ /**
+ * auto translate posts and terms ids
+ *
+ * @since 1.2
+ */
+ public function auto_translate() {
+ $this->auto_translate = new PLL_Frontend_Auto_Translate( $this );
+ }
+
+ /**
+ * resets some variables when switching blog
+ * overrides parent method
+ *
+ * @since 1.5.1
+ *
+ * @param int $new_blog
+ * @param int $old_blog
+ */
+ public function switch_blog( $new_blog, $old_blog ) {
+ // need to check that some languages are defined when user is logged in, has several blogs, some without any languages
+ if ( parent::switch_blog( $new_blog, $old_blog ) && did_action( 'pll_language_defined' ) && $this->model->get_languages_list() ) {
+ static $restore_curlang;
+ if ( empty( $restore_curlang ) ) {
+ $restore_curlang = $this->curlang->slug; // to always remember the current language through blogs
+ }
+
+ $lang = $this->model->get_language( $restore_curlang );
+ $this->curlang = $lang ? $lang : $this->model->get_language( $this->options['default_lang'] );
+
+ if ( isset( $this->static_pages ) ) {
+ $this->static_pages->init();
+ }
+
+ $this->load_strings_translations();
+ }
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/api.php b/pole-sbv-content/plugins/polylang/include/api.php
new file mode 100644
index 00000000..3a39de59
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/api.php
@@ -0,0 +1,379 @@
+ displays a dropdown if set to 1, defaults to 0
+ * echo => echoes the switcher if set to 1 ( default )
+ * hide_if_empty => hides languages with no posts ( or pages ) if set to 1 ( default )
+ * show_flags => shows flags if set to 1, defaults to 0
+ * show_names => shows languages names if set to 1 ( default )
+ * display_names_as => whether to display the language name or its slug, valid options are 'slug' and 'name', defaults to name
+ * force_home => forces linking to the home page is set to 1, defaults to 0
+ * hide_if_no_translation => hides the link if there is no translation if set to 1, defaults to 0
+ * hide_current => hides the current language if set to 1, defaults to 0
+ * post_id => if not null, link to translations of post defined by post_id, defaults to null
+ * raw => set this to true to build your own custom language switcher, defaults to 0
+ * item_spacing => whether to preserve or discard whitespace between list items, valid options are 'preserve' and 'discard', defaults to preserve
+ *
+ * @since 0.5
+ *
+ * @param array $args optional
+ * @return null|string|array null if displaying, array if raw is requested, string otherwise
+ */
+function pll_the_languages( $args = '' ) {
+ if ( PLL() instanceof PLL_Frontend ) {
+ $switcher = new PLL_Switcher;
+ return $switcher->the_languages( PLL()->links, $args );
+ }
+ return '';
+}
+
+/**
+ * Returns the current language on frontend
+ * Returns the language set in admin language filter on backend ( false if set to all languages )
+ *
+ * @since 0.8.1
+ *
+ * @param string $field Optional, the language field to return ( see PLL_Language ), defaults to 'slug'
+ * @return string|bool The requested field for the current language
+ */
+function pll_current_language( $field = 'slug' ) {
+ return isset( PLL()->curlang->$field ) ? PLL()->curlang->$field : false;
+}
+
+/**
+ * Returns the default language
+ *
+ * @since 1.0
+ *
+ * @param string $field Optional, the language field to return ( see PLL_Language ), defaults to 'slug'
+ * @return string The requested field for the default language
+ */
+function pll_default_language( $field = 'slug' ) {
+ return isset( PLL()->options['default_lang'] ) && ( $lang = PLL()->model->get_language( PLL()->options['default_lang'] ) ) && isset( $lang->$field ) ? $lang->$field : false;
+}
+
+/**
+ * Among the post and its translations, returns the id of the post which is in the language represented by $slug
+ *
+ * @since 0.5
+ *
+ * @param int $post_id post id
+ * @param string $slug optional language code, defaults to current language
+ * @return int|false|null post id of the translation if exists, false otherwise, null if the current language is not defined yet
+ */
+function pll_get_post( $post_id, $slug = '' ) {
+ return ( $slug = $slug ? $slug : pll_current_language() ) ? PLL()->model->post->get( $post_id, $slug ) : null;
+}
+
+/**
+ * Among the term and its translations, returns the id of the term which is in the language represented by $slug
+ *
+ * @since 0.5
+ *
+ * @param int $term_id term id
+ * @param string $slug optional language code, defaults to current language
+ * @return int|false|null term id of the translation if exists, false otherwise, null if the current language is not defined yet
+ */
+function pll_get_term( $term_id, $slug = '' ) {
+ return ( $slug = $slug ? $slug : pll_current_language() ) ? PLL()->model->term->get( $term_id, $slug ) : null;
+}
+
+/**
+ * Returns the home url in the current language
+ *
+ * @since 0.8
+ *
+ * @param string $lang language code ( optional on frontend )
+ * @return string
+ */
+function pll_home_url( $lang = '' ) {
+ if ( empty( $lang ) ) {
+ $lang = pll_current_language();
+ }
+
+ return empty( $lang ) ? home_url( '/' ) : PLL()->links->get_home_url( $lang );
+}
+
+/**
+ * Registers a string for translation in the "strings translation" panel
+ *
+ * @since 0.6
+ *
+ * @param string $name a unique name for the string
+ * @param string $string the string to register
+ * @param string $context optional the group in which the string is registered, defaults to 'polylang'
+ * @param bool $multiline optional wether the string table should display a multiline textarea or a single line input, defaults to single line
+ */
+function pll_register_string( $name, $string, $context = 'polylang', $multiline = false ) {
+ if ( PLL() instanceof PLL_Admin_Base ) {
+ PLL_Admin_Strings::register_string( $name, $string, $context, $multiline );
+ }
+}
+
+/**
+ * Translates a string ( previously registered with pll_register_string )
+ *
+ * @since 0.6
+ *
+ * @param string $string the string to translate
+ * @return string the string translation in the current language
+ */
+function pll__( $string ) {
+ return is_scalar( $string ) ? __( $string, 'pll_string' ) : $string;
+}
+
+/**
+ * Translates a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML output.
+ *
+ * @since 2.1
+ *
+ * @param string $string the string to translate
+ * @return string translation in the current language
+ */
+function pll_esc_html__( $string ) {
+ return esc_html( pll__( $string ) );
+}
+
+/**
+ * Translates a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML attributes.
+ *
+ * @since 2.1
+ *
+ * @param string $string The string to translate
+ * @return string
+ */
+function pll_esc_attr__( $string ) {
+ return esc_attr( pll__( $string ) );
+}
+
+/**
+ * Echoes a translated string ( previously registered with pll_register_string )
+ *
+ * @since 0.6
+ *
+ * @param string $string The string to translate
+ */
+function pll_e( $string ) {
+ echo pll__( $string );
+}
+
+/**
+ * Echoes a translated string ( previously registered with pll_register_string ) and escapes it for safe use in HTML output.
+ *
+ * @since 2.1
+ *
+ * @param string $string The string to translate
+ */
+function pll_esc_html_e( $string ) {
+ echo pll_esc_html__( $string );
+}
+
+/**
+ * Echoes a translated a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML attributes.
+ *
+ * @since 2.1
+ *
+ * @param string $string The string to translate
+ */
+function pll_esc_attr_e( $string ) {
+ echo pll_esc_attr__( $string );
+}
+
+/**
+ * Translates a string ( previously registered with pll_register_string )
+ *
+ * @since 1.5.4
+ *
+ * @param string $string the string to translate
+ * @param string $lang language code
+ * @return string the string translation in the requested language
+ */
+function pll_translate_string( $string, $lang ) {
+ if ( PLL() instanceof PLL_Frontend && pll_current_language() == $lang ) {
+ return pll__( $string );
+ }
+
+ if ( ! is_scalar( $string ) ) {
+ return $string;
+ }
+
+ static $cache; // Cache object to avoid loading the same translations object several times
+
+ if ( empty( $cache ) ) {
+ $cache = new PLL_Cache();
+ }
+
+ if ( false === $mo = $cache->get( $lang ) ) {
+ $mo = new PLL_MO();
+ $mo->import_from_db( PLL()->model->get_language( $lang ) );
+ $cache->set( $lang, $mo );
+ }
+
+ return $mo->translate( $string );
+}
+
+/**
+ * Returns true if Polylang manages languages and translations for this post type
+ *
+ * @since 1.0.1
+ *
+ * @param string $post_type Post type name
+ * @return bool
+ */
+function pll_is_translated_post_type( $post_type ) {
+ return PLL()->model->is_translated_post_type( $post_type );
+}
+
+/**
+ * Returns true if Polylang manages languages and translations for this taxonomy
+ *
+ * @since 1.0.1
+ *
+ * @param string $tax Taxonomy name
+ * @return bool
+ */
+function pll_is_translated_taxonomy( $tax ) {
+ return PLL()->model->is_translated_taxonomy( $tax );
+}
+
+/**
+ * Returns the list of available languages
+ *
+ * List of parameters accepted in $args:
+ *
+ * hide_empty => hides languages with no posts if set to true ( defaults to false )
+ * fields => return only that field if set ( see PLL_Language for a list of fields )
+ *
+ * @since 1.5
+ *
+ * @param array $args list of parameters
+ * @return array
+ */
+function pll_languages_list( $args = array() ) {
+ $args = wp_parse_args( $args, array( 'fields' => 'slug' ) );
+ return PLL()->model->get_languages_list( $args );
+}
+
+/**
+ * Set the post language
+ *
+ * @since 1.5
+ *
+ * @param int $id post id
+ * @param string $lang language code
+ */
+function pll_set_post_language( $id, $lang ) {
+ PLL()->model->post->set_language( $id, $lang );
+}
+
+/**
+ * Set the term language
+ *
+ * @since 1.5
+ *
+ * @param int $id term id
+ * @param string $lang language code
+ */
+function pll_set_term_language( $id, $lang ) {
+ PLL()->model->term->set_language( $id, $lang );
+}
+
+/**
+ * Save posts translations
+ *
+ * @since 1.5
+ *
+ * @param array $arr an associative array of translations with language code as key and post id as value
+ */
+function pll_save_post_translations( $arr ) {
+ PLL()->model->post->save_translations( reset( $arr ), $arr );
+}
+
+/**
+ * Save terms translations
+ *
+ * @since 1.5
+ *
+ * @param array $arr an associative array of translations with language code as key and term id as value
+ */
+function pll_save_term_translations( $arr ) {
+ PLL()->model->term->save_translations( reset( $arr ), $arr );
+}
+
+/**
+ * Returns the post language
+ *
+ * @since 1.5.4
+ *
+ * @param int $post_id
+ * @param string $field Optional, the language field to return ( see PLL_Language ), defaults to 'slug'
+ * @return bool|string The requested field for the post language, false if no language is associated to that post
+ */
+function pll_get_post_language( $post_id, $field = 'slug' ) {
+ return ( $lang = PLL()->model->post->get_language( $post_id ) ) ? $lang->$field : false;
+}
+
+/**
+ * Returns the term language
+ *
+ * @since 1.5.4
+ *
+ * @param int $term_id
+ * @param string $field Optional, the language field to return ( see PLL_Language ), defaults to 'slug'
+ * @return bool|string The requested field for the term language, false if no language is associated to that term
+ */
+function pll_get_term_language( $term_id, $field = 'slug' ) {
+ return ( $lang = PLL()->model->term->get_language( $term_id ) ) ? $lang->$field : false;
+}
+
+/**
+ * Returns an array of translations of a post
+ *
+ * @since 1.8
+ *
+ * @param int $post_id
+ * @return array an associative array of translations with language code as key and translation post_id as value
+ */
+function pll_get_post_translations( $post_id ) {
+ return PLL()->model->post->get_translations( $post_id );
+}
+
+/**
+ * Returns an array of translations of a term
+ *
+ * @since 1.8
+ *
+ * @param int $term_id
+ * @return array an associative array of translations with language code as key and translation term_id as value
+ */
+function pll_get_term_translations( $term_id ) {
+ return PLL()->model->term->get_translations( $term_id );
+}
+
+/**
+ * Count posts in a language
+ *
+ * @since 1.5
+ *
+ * @param string $lang language code
+ * @param array $args ( accepted keys: post_type, m, year, monthnum, day, author, author_name, post_format )
+ * @return int posts count
+ */
+function pll_count_posts( $lang, $args = array() ) {
+ return PLL()->model->count_posts( PLL()->model->get_language( $lang ), $args );
+}
+
+/**
+ * Allows to access the Polylang instance
+ * It is always preferable to use API functions
+ * Internal methods may be changed without prior notice
+ *
+ * @since 1.8
+ */
+function PLL() {
+ return $GLOBALS['polylang'];
+}
diff --git a/pole-sbv-content/plugins/polylang/include/base.php b/pole-sbv-content/plugins/polylang/include/base.php
new file mode 100644
index 00000000..66ef339b
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/base.php
@@ -0,0 +1,126 @@
+links_model = &$links_model;
+ $this->model = &$links_model->model;
+ $this->options = &$this->model->options;
+
+ $GLOBALS['l10n_unloaded']['pll_string'] = true; // Short-circuit _load_textdomain_just_in_time() for 'pll_string' domain in WP 4.6+
+
+ add_action( 'widgets_init', array( $this, 'widgets_init' ) );
+
+ // User defined strings translations
+ add_action( 'pll_language_defined', array( $this, 'load_strings_translations' ), 5 );
+ add_action( 'change_locale', array( $this, 'load_strings_translations' ) ); // Since WP 4.7
+
+ // Switch_to_blog
+ add_action( 'switch_blog', array( $this, 'switch_blog' ), 10, 2 );
+ }
+
+ /**
+ * Registers our widgets
+ *
+ * @since 0.1
+ */
+ public function widgets_init() {
+ register_widget( 'PLL_Widget_Languages' );
+
+ // Overwrites the calendar widget to filter posts by language
+ if ( ! defined( 'PLL_WIDGET_CALENDAR' ) || PLL_WIDGET_CALENDAR ) {
+ unregister_widget( 'WP_Widget_Calendar' );
+ register_widget( 'PLL_Widget_Calendar' );
+ }
+ }
+
+ /**
+ * Loads user defined strings translations
+ *
+ * @since 1.2
+ * @since 2.1.3 $locale parameter added.
+ *
+ * @param string $locale Locale. Defaults to current locale.
+ */
+ public function load_strings_translations( $locale = '' ) {
+ if ( empty( $locale ) ) {
+ $locale = get_locale();
+ }
+
+ $language = $this->model->get_language( $locale );
+
+ if ( ! empty( $language ) ) {
+ $mo = new PLL_MO();
+ $mo->import_from_db( $language );
+ $GLOBALS['l10n']['pll_string'] = &$mo;
+ } else {
+ unset( $GLOBALS['l10n']['pll_string'] );
+ }
+ }
+
+ /**
+ * Resets some variables when switching blog
+ * Applies only if Polylang is active on the new blog
+ *
+ * @since 1.5.1
+ *
+ * @param int $new_blog
+ * @param int $old_blog
+ * @return bool not used by WP but by child class
+ */
+ public function switch_blog( $new_blog, $old_blog ) {
+ $plugins = ( $sitewide_plugins = get_site_option( 'active_sitewide_plugins' ) ) && is_array( $sitewide_plugins ) ? array_keys( $sitewide_plugins ) : array();
+ $plugins = array_merge( $plugins, get_option( 'active_plugins', array() ) );
+
+ // 2nd test needed when Polylang is not networked activated
+ // 3rd test needed when Polylang is networked activated and a new site is created
+ if ( $new_blog != $old_blog && in_array( POLYLANG_BASENAME, $plugins ) && get_option( 'polylang' ) ) {
+ $this->options = get_option( 'polylang' ); // Needed for menus
+ $this->links_model = $this->model->get_links_model();
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Some backward compatibility with Polylang < 1.2
+ * Allows for example to call $polylang->get_languages_list() instead of $polylang->model->get_languages_list()
+ * This works but should be slower than the direct call, thus an error is triggered in debug mode
+ *
+ * @since 1.2
+ *
+ * @param string $func function name
+ * @param array $args function arguments
+ */
+ public function __call( $func, $args ) {
+ foreach ( $this as $prop => &$obj ) {
+ if ( is_object( $obj ) && method_exists( $obj, $func ) ) {
+ if ( WP_DEBUG ) {
+ $debug = debug_backtrace();
+ $i = 1 + empty( $debug[1]['line'] ); // The file and line are in $debug[2] if the function was called using call_user_func
+ trigger_error( sprintf(
+ '%1$s was called incorrectly in %3$s on line %4$s: the call to $polylang->%1$s() has been deprecated in Polylang 1.2, use PLL()->%2$s->%1$s() instead.' . "\nError handler",
+ $func, $prop, $debug[ $i ]['file'], $debug[ $i ]['line']
+ ) );
+ }
+ return call_user_func_array( array( $obj, $func ), $args );
+ }
+ }
+
+ $debug = debug_backtrace();
+ trigger_error( sprintf( 'Call to undefined function PLL()->%1$s() in %2$s on line %3$s' . "\nError handler", $func, $debug[0]['file'], $debug[0]['line'] ), E_USER_ERROR );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/cache.php b/pole-sbv-content/plugins/polylang/include/cache.php
new file mode 100644
index 00000000..971df9c3
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/cache.php
@@ -0,0 +1,72 @@
+blog_id = get_current_blog_id();
+ add_action( 'switch_blog', array( $this, 'switch_blog' ) );
+ }
+
+ /**
+ * Called when switching blog
+ *
+ * @since 1.7
+ *
+ * @param int $new_blog
+ */
+ public function switch_blog( $new_blog ) {
+ $this->blog_id = $new_blog;
+ }
+
+ /**
+ * Add a value in cache
+ *
+ * @since 1.7
+ *
+ * @param string $key
+ * @param mixed $data
+ */
+ public function set( $key, $data ) {
+ $this->cache[ $this->blog_id ][ $key ] = $data;
+ }
+
+ /**
+ * Get value from cache
+ *
+ * @since 1.7
+ *
+ * @param string $key
+ * @return mixed $data
+ */
+ public function get( $key ) {
+ return isset( $this->cache[ $this->blog_id ][ $key ] ) ? $this->cache[ $this->blog_id ][ $key ] : false;
+ }
+
+ /**
+ * Clean the cache (for this blog only)
+ *
+ * @since 1.7
+ *
+ * @param string $key
+ */
+ public function clean( $key = '' ) {
+ if ( empty( $key ) ) {
+ unset( $this->cache[ $this->blog_id ] );
+ }
+ else {
+ unset( $this->cache[ $this->blog_id ][ $key ] );
+ }
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/class-polylang.php b/pole-sbv-content/plugins/polylang/include/class-polylang.php
new file mode 100644
index 00000000..4f5f07ce
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/class-polylang.php
@@ -0,0 +1,222 @@
+is_deactivation() ) {
+ return;
+ }
+
+ // Plugin initialization
+ // Take no action before all plugins are loaded
+ add_action( 'plugins_loaded', array( $this, 'init' ), 1 );
+
+ // Override load text domain waiting for the language to be defined
+ // Here for plugins which load text domain as soon as loaded :(
+ if ( ! defined( 'PLL_OLT' ) || PLL_OLT ) {
+ PLL_OLT_Manager::instance();
+ }
+
+ // Extra code for compatibility with some plugins
+ // Loaded as soon as possible as we may need to act before other plugins are loaded
+ if ( ! defined( 'PLL_PLUGINS_COMPAT' ) || PLL_PLUGINS_COMPAT ) {
+ PLL_Plugins_Compat::instance();
+ }
+ }
+
+ /**
+ * Autoload classes
+ *
+ * @since 1.2
+ *
+ * @param string $class
+ */
+ public function autoload( $class ) {
+ // Not a Polylang class
+ if ( 0 !== strncmp( 'PLL_', $class, 4 ) ) {
+ return;
+ }
+
+ $class = str_replace( '_', '-', strtolower( substr( $class, 4 ) ) );
+ $to_find = array( 'media', 'share', 'slug', 'slugs', 'sync', 'translate', 'wpml', 'xdata', 'rest' );
+ $dir = implode( '-', array_intersect( explode( '-', $class ), $to_find ) );
+
+ $dirs = array(
+ PLL_FRONT_INC,
+ PLL_MODULES_INC,
+ PLL_MODULES_INC . "/$dir",
+ PLL_MODULES_INC . '/plugins',
+ PLL_INSTALL_INC,
+ PLL_ADMIN_INC,
+ PLL_SETTINGS_INC,
+ PLL_INC,
+ );
+
+ foreach ( $dirs as $dir ) {
+ if ( file_exists( $file = "$dir/$class.php" ) ) {
+ require_once $file;
+ return;
+ }
+ }
+ }
+
+ /**
+ * Tells whether the current request is an ajax request on frontend or not
+ *
+ * @since 2.2
+ *
+ * @return bool
+ */
+ static public function is_ajax_on_front() {
+ // Special test for plupload which does not use jquery ajax and thus does not pass our ajax prefilter
+ // Special test for customize_save done in frontend but for which we want to load the admin
+ $in = isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], array( 'upload-attachment', 'customize_save' ) );
+ return wp_doing_ajax() && empty( $_REQUEST['pll_ajax_backend'] ) && ! $in;
+ }
+
+ /**
+ * Defines constants
+ * May be overriden by a plugin if set before plugins_loaded, 1
+ *
+ * @since 1.6
+ */
+ static public function define_constants() {
+ // Cookie name. no cookie will be used if set to false
+ if ( ! defined( 'PLL_COOKIE' ) ) {
+ define( 'PLL_COOKIE', 'pll_language' );
+ }
+
+ // Avoid loading polylang admin for frontend ajax requests
+ if ( ! defined( 'PLL_AJAX_ON_FRONT' ) ) {
+ define( 'PLL_AJAX_ON_FRONT', self::is_ajax_on_front() );
+ }
+
+ // Admin
+ if ( ! defined( 'PLL_ADMIN' ) ) {
+ define( 'PLL_ADMIN', defined( 'DOING_CRON' ) || ( is_admin() && ! PLL_AJAX_ON_FRONT ) );
+ }
+
+ // Settings page whatever the tab
+ if ( ! defined( 'PLL_SETTINGS' ) ) {
+ define( 'PLL_SETTINGS', is_admin() && ( ( isset( $_GET['page'] ) && 0 === strpos( $_GET['page'], 'mlang' ) ) || ! empty( $_REQUEST['pll_ajax_settings'] ) ) );
+ }
+ }
+
+ /**
+ * Polylang initialization
+ * setups models and separate admin and frontend
+ *
+ * @since 1.2
+ */
+ public function init() {
+ global $polylang;
+
+ self::define_constants();
+ $options = get_option( 'polylang' );
+
+ // Plugin upgrade
+ if ( $options && version_compare( $options['version'], POLYLANG_VERSION, '<' ) ) {
+ $upgrade = new PLL_Upgrade( $options );
+ if ( ! $upgrade->upgrade() ) { // If the version is too old
+ return;
+ }
+ }
+
+ // Make sure that this filter is *always* added before PLL_Model::get_languages_list() is called for the first time
+ add_filter( 'pll_languages_list', array( 'PLL_Static_Pages', 'pll_languages_list' ), 2, 2 ); // Before PLL_Links_Model
+
+ /**
+ * Filter the model class to use
+ * /!\ this filter is fired *before* the $polylang object is available
+ *
+ * @since 1.5
+ *
+ * @param string $class either PLL_Model or PLL_Admin_Model
+ */
+ $class = apply_filters( 'pll_model', PLL_SETTINGS ? 'PLL_Admin_Model' : 'PLL_Model' );
+ $model = new $class( $options );
+ $links_model = $model->get_links_model();
+
+ if ( PLL_SETTINGS ) {
+ $polylang = new PLL_Settings( $links_model );
+ }
+ elseif ( PLL_ADMIN ) {
+ $polylang = new PLL_Admin( $links_model );
+ }
+ // Do nothing on frontend if no language is defined
+ elseif ( $model->get_languages_list() && empty( $_GET['deactivate-polylang'] ) ) {
+ $polylang = new PLL_Frontend( $links_model );
+ }
+
+ if ( ! $model->get_languages_list() ) {
+ /**
+ * Fires when no language has been defined yet
+ * Used to load overriden textdomains
+ *
+ * @since 1.2
+ */
+ do_action( 'pll_no_language_defined' );
+ }
+
+ if ( ! empty( $polylang ) ) {
+ /**
+ * Fires after the $polylang object is created and before the API is loaded
+ *
+ * @since 2.0
+ *
+ * @param object $polylang
+ */
+ do_action_ref_array( 'pll_pre_init', array( &$polylang ) );
+
+ require_once PLL_INC . '/api.php'; // Loads the API
+
+ if ( ! defined( 'PLL_WPML_COMPAT' ) || PLL_WPML_COMPAT ) {
+ PLL_WPML_Compat::instance(); // WPML API
+ PLL_WPML_Config::instance(); // wpml-config.xml
+ }
+
+ $polylang->init();
+
+ /**
+ * Fires after the $polylang object and the API is loaded
+ *
+ * @since 1.7
+ *
+ * @param object $polylang
+ */
+ do_action_ref_array( 'pll_init', array( &$polylang ) );
+ }
+ }
+}
+
+new Polylang();
diff --git a/pole-sbv-content/plugins/polylang/include/filters-links.php b/pole-sbv-content/plugins/polylang/include/filters-links.php
new file mode 100644
index 00000000..e7c55013
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/filters-links.php
@@ -0,0 +1,167 @@
+links = &$polylang->links;
+ $this->links_model = &$polylang->links_model;
+ $this->model = &$polylang->model;
+ $this->options = &$polylang->options;
+ $this->curlang = &$polylang->curlang;
+
+ // Low priority on links filters to come after any other modifications
+ if ( $this->options['force_lang'] ) {
+ add_filter( 'post_link', array( $this, 'post_type_link' ), 20, 2 );
+ add_filter( '_get_page_link', array( $this, '_get_page_link' ), 20, 2 );
+ }
+
+ add_filter( 'post_type_link', array( $this, 'post_type_link' ), 20, 2 );
+ add_filter( 'term_link', array( $this, 'term_link' ), 20, 3 );
+
+ if ( $this->options['force_lang'] > 0 ) {
+ add_filter( 'attachment_link', array( $this, 'attachment_link' ), 20, 2 );
+ }
+
+ if ( 3 === $this->options['force_lang'] ) {
+ add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 20 );
+ }
+
+ // Rewrites post types archives links to filter them by language
+ add_filter( 'post_type_archive_link', array( $this, 'post_type_archive_link' ), 20, 2 );
+ }
+
+ /**
+ * Modifies page links
+ *
+ * @since 1.7
+ *
+ * @param string $link post link
+ * @param int $post_id post ID
+ * @return string modified post link
+ */
+ public function _get_page_link( $link, $post_id ) {
+ // /!\ WP does not use pretty permalinks for preview
+ return false !== strpos( $link, 'preview=true' ) && false !== strpos( $link, 'page_id=' ) ? $link : $this->links_model->switch_language_in_link( $link, $this->model->post->get_language( $post_id ) );
+ }
+
+ /**
+ * Modifies attachment links
+ *
+ * @since 1.6.2
+ *
+ * @param string $link attachment link
+ * @param int $post_id attachment link
+ * @return string modified attachment link
+ */
+ public function attachment_link( $link, $post_id ) {
+ return wp_get_post_parent_id( $post_id ) ? $link : $this->links_model->switch_language_in_link( $link, $this->model->post->get_language( $post_id ) );
+ }
+
+ /**
+ * Modifies custom posts links
+ *
+ * @since 1.6
+ *
+ * @param string $link post link
+ * @param object $post post object
+ * @return string modified post link
+ */
+ public function post_type_link( $link, $post ) {
+ // /!\ WP does not use pretty permalinks for preview
+ if ( ( false === strpos( $link, 'preview=true' ) || false === strpos( $link, 'p=' ) ) && $this->model->is_translated_post_type( $post->post_type ) ) {
+ $lang = $this->model->post->get_language( $post->ID );
+ $link = $this->options['force_lang'] ? $this->links_model->switch_language_in_link( $link, $lang ) : $link;
+
+ /**
+ * Filter a post or custom post type link
+ *
+ * @since 1.6
+ *
+ * @param string $link the post link
+ * @param object $lang the current language
+ * @param object $post the post object
+ */
+ $link = apply_filters( 'pll_post_type_link', $link, $lang, $post );
+ }
+
+ return $link;
+ }
+
+ /**
+ * Modifies term link
+ *
+ * @since 0.7
+ *
+ * @param string $link term link
+ * @param object $term term object
+ * @param string $tax taxonomy name
+ * @return string modified term link
+ */
+ public function term_link( $link, $term, $tax ) {
+ if ( $this->model->is_translated_taxonomy( $tax ) ) {
+ $lang = $this->model->term->get_language( $term->term_id );
+ $link = $this->options['force_lang'] ? $this->links_model->switch_language_in_link( $link, $lang ) : $link;
+
+ /**
+ * Filter a term link
+ *
+ * @since 1.6
+ *
+ * @param string $link the term link
+ * @param object $lang the current language
+ * @param object $term the term object
+ */
+ return apply_filters( 'pll_term_link', $link, $lang, $term );
+ }
+
+ // in case someone calls get_term_link for the 'language' taxonomy
+ if ( 'language' === $tax ) {
+ return $this->links_model->home_url( $term );
+ }
+
+ return $link;
+ }
+
+ /**
+ * FIXME: keeps the preview post link on default domain when using multiple domains
+ *
+ * @since 1.6.1
+ *
+ * @param string $url
+ * @return string modified url
+ */
+ public function preview_post_link( $url ) {
+ return $this->links_model->remove_language_from_link( $url );
+ }
+
+ /**
+ * Modifies the post type archive links to add the language parameter
+ * only if the post type is translated
+ *
+ * The filter was originally only on frontend but is needed on admin too for
+ * compatibility with the archive link of the ACF link field since ACF 5.4.0
+ *
+ * @since 1.7.6
+ *
+ * @param string $link
+ * @param string $post_type
+ * @return string modified link
+ */
+ public function post_type_archive_link( $link, $post_type ) {
+ return $this->model->is_translated_post_type( $post_type ) && 'post' !== $post_type ? $this->links_model->switch_language_in_link( $link, $this->curlang ) : $link;
+ }
+}
+
diff --git a/pole-sbv-content/plugins/polylang/include/filters.php b/pole-sbv-content/plugins/polylang/include/filters.php
new file mode 100644
index 00000000..f7da7cc6
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/filters.php
@@ -0,0 +1,227 @@
+links_model = &$polylang->links_model;
+ $this->model = &$polylang->model;
+ $this->options = &$polylang->options;
+ $this->curlang = &$polylang->curlang;
+
+ // Filters the comments according to the current language
+ add_action( 'parse_comment_query', array( $this, 'parse_comment_query' ) );
+ add_filter( 'comments_clauses', array( $this, 'comments_clauses' ), 10, 2 );
+
+ // Filters the get_pages function according to the current language
+ add_filter( 'get_pages', array( $this, 'get_pages' ), 10, 2 );
+
+ // Converts the locale to a valid W3C locale
+ add_filter( 'language_attributes', array( $this, 'language_attributes' ) );
+
+ // Prevents deleting all the translations of the default category
+ add_filter( 'map_meta_cap', array( $this, 'fix_delete_default_category' ), 10, 4 );
+
+ // Translate the site title in emails sent to users
+ add_filter( 'password_change_email', array( $this, 'translate_user_email' ) );
+ add_filter( 'email_change_email', array( $this, 'translate_user_email' ) );
+ }
+
+ /**
+ * Get the language to filter a comments query
+ *
+ * @since 2.0
+ *
+ * @param object $query
+ * @return object|bool the language(s) to use in the filter, false otherwise
+ */
+ protected function get_comments_queried_language( $query ) {
+ // Don't filter comments if comment ids or post ids are specified
+ $plucked = wp_array_slice_assoc( $query->query_vars, array( 'comment__in', 'parent', 'post_id', 'post__in', 'post_parent' ) );
+ $fields = array_filter( $plucked );
+ if ( ! empty( $fields ) ) {
+ return false;
+ }
+
+ // Don't filter comments if a non translated post type is specified
+ if ( ! empty( $query->query_vars['post_type'] ) && ! $this->model->is_translated_post_type( $query->query_vars['post_type'] ) ) {
+ return false;
+ }
+
+ return empty( $query->query_vars['lang'] ) ? $this->curlang : $this->model->get_language( $query->query_vars['lang'] );
+ }
+
+ /**
+ * Adds language dependent cache domain when querying comments
+ * Useful as the 'lang' parameter is not included in cache key by WordPress
+ * Needed since WP 4.6 as comments have been added to persistent cache. See #36906, #37419
+ *
+ * @since 2.0
+ *
+ * @param object $query
+ */
+ public function parse_comment_query( $query ) {
+ if ( $lang = $this->get_comments_queried_language( $query ) ) {
+ $key = '_' . ( is_array( $lang ) ? implode( ',', $lang ) : $this->model->get_language( $lang )->slug );
+ $query->query_vars['cache_domain'] = empty( $query->query_vars['cache_domain'] ) ? 'pll' . $key : $query->query_vars['cache_domain'] . $key;
+ }
+ }
+
+ /**
+ * Filters the comments according to the current language
+ * Used by the recent comments widget and admin language filter
+ *
+ * @since 0.2
+ *
+ * @param array $clauses sql clauses
+ * @param object $query WP_Comment_Query object
+ * @return array modified $clauses
+ */
+ public function comments_clauses( $clauses, $query ) {
+ global $wpdb;
+
+ $lang = $this->get_comments_queried_language( $query );
+
+ if ( ! empty( $lang ) ) {
+ // If this clause is not already added by WP
+ if ( ! strpos( $clauses['join'], '.ID' ) ) {
+ $clauses['join'] .= " JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID";
+ }
+
+ $clauses['join'] .= $this->model->post->join_clause();
+ $clauses['where'] .= $this->model->post->where_clause( $lang );
+ }
+ return $clauses;
+ }
+
+ /**
+ * Filters get_pages per language
+ *
+ * @since 1.4
+ *
+ * @param array $pages an array of pages already queried
+ * @param array $args get_pages arguments
+ * @return array modified list of pages
+ */
+ public function get_pages( $pages, $args ) {
+ if ( isset( $args['lang'] ) && empty( $args['lang'] ) ) {
+ return $pages;
+ }
+
+ $language = empty( $args['lang'] ) ? $this->curlang : $this->model->get_language( $args['lang'] );
+
+ if ( empty( $language ) || empty( $pages ) || ! $this->model->is_translated_post_type( $args['post_type'] ) ) {
+ return $pages;
+ }
+
+ static $once = false;
+
+ // Obliged to redo the get_pages query if we want to get the right number
+ if ( ! empty( $args['number'] ) && ! $once ) {
+ $once = true; // avoid infinite loop
+
+ $r = array(
+ 'lang' => 0, // So this query is not filtered
+ 'numberposts' => -1,
+ 'nopaging' => true,
+ 'post_type' => $args['post_type'],
+ 'fields' => 'ids',
+ 'tax_query' => array(
+ array(
+ 'taxonomy' => 'language',
+ 'field' => 'term_taxonomy_id', // Since WP 3.5
+ 'terms' => $language->term_taxonomy_id,
+ 'operator' => 'NOT IN',
+ ),
+ ),
+ );
+
+ $args['exclude'] = array_merge( $args['exclude'], get_posts( $r ) );
+ $pages = get_pages( $args );
+ }
+
+ $ids = wp_list_pluck( $pages, 'ID' );
+
+ // Filters the queried list of pages by language
+ if ( ! $once ) {
+ $ids = array_intersect( $ids, $this->model->post->get_objects_in_language( $language ) );
+
+ foreach ( $pages as $key => $page ) {
+ if ( ! in_array( $page->ID, $ids ) ) {
+ unset( $pages[ $key ] );
+ }
+ }
+
+ $pages = array_values( $pages ); // In case 3rd parties suppose the existence of $pages[0]
+ }
+
+ // Not done by WP but extremely useful for performance when manipulating taxonomies
+ update_object_term_cache( $ids, $args['post_type'] );
+
+ $once = false; // In case get_pages is called another time
+ return $pages;
+ }
+
+ /**
+ * Converts WordPress locale to valid W3 locale in html language attributes
+ *
+ * @since 1.8
+ *
+ * @param string $output language attributes
+ * @return string
+ */
+ public function language_attributes( $output ) {
+ if ( $language = $this->model->get_language( get_locale() ) ) {
+ $output = str_replace( '"' . get_bloginfo( 'language' ) . '"', '"' . $language->get_locale( 'display' ) . '"', $output );
+ }
+ return $output;
+ }
+
+
+ /**
+ * Prevents deleting all the translations of the default category
+ *
+ * @since 2.1
+ *
+ * @param array $caps The user's actual capabilities.
+ * @param string $cap Capability name.
+ * @param int $user_id The user ID.
+ * @param array $args Adds the context to the cap. The category id.
+ * @return array
+ */
+ public function fix_delete_default_category( $caps, $cap, $user_id, $args ) {
+ if ( 'delete_term' === $cap && array_intersect( $args, $this->model->term->get_translations( get_option( 'default_category' ) ) ) ) {
+ $caps[] = 'do_not_allow';
+ }
+
+ return $caps;
+ }
+
+ /**
+ * Translates the site title in emails sent to the user (change email, reset password)
+ * It is necessary to filter the email because WP evaluates the site title before calling switch_to_locale()
+ *
+ * @since 2.1.3
+ *
+ * @param array $email
+ * @return array
+ */
+ function translate_user_email( $email ) {
+ $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
+ $email['subject'] = sprintf( $email['subject'], $blog_name );
+ $email['message'] = str_replace( '###SITENAME###', $blog_name, $email['message'] );
+ return $email;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/functions.php b/pole-sbv-content/plugins/polylang/include/functions.php
new file mode 100644
index 00000000..ab555743
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/functions.php
@@ -0,0 +1,84 @@
+ id of term in 'language' taxonomy
+ * name => language name. Ex: English
+ * slug => language code used in url. Ex: en
+ * term_group => order of the language when displayed in a list of languages
+ * term_taxonomy_id => term taxonomy id in 'language' taxonomy
+ * taxonomy => 'language'
+ * description => language locale for backward compatibility
+ * parent => 0 / not used
+ * count => number of posts and pages in that language
+ * tl_term_id => id of the term in 'term_language' taxonomy
+ * tl_term_taxonomy_id => term taxonomy id in 'term_language' taxonomy
+ * tl_count => number of terms in that language ( not used by Polylang )
+ * locale => WordPress language locale. Ex: en_US
+ * is_rtl => 1 if the language is rtl
+ * flag_code => code of the flag
+ * flag_url => url of the flag
+ * flag => html img of the flag
+ * custom_flag_url => url of the custom flag if exists, internal use only, moves to flag_url on frontend
+ * custom_flag => html img of the custom flag if exists, internal use only, moves to flag on frontend
+ * home_url => home url in this language
+ * search_url => home url to use in search forms
+ * host => host of this language
+ * mo_id => id of the post storing strings translations
+ * page_on_front => id of the page on front in this language ( set from pll_languages_list filter )
+ * page_for_posts => id of the page for posts in this language ( set from pll_languages_list filter )
+ *
+ * @since 1.2
+ */
+class PLL_Language {
+ public $term_id, $name, $slug, $term_group, $term_taxonomy_id, $taxonomy, $description, $parent, $count;
+ public $tl_term_id, $tl_term_taxonomy_id, $tl_count;
+ public $locale, $is_rtl;
+ public $flag_url, $flag;
+ public $home_url, $search_url;
+ public $host, $mo_id;
+ public $page_on_front, $page_for_posts;
+
+ /**
+ * constructor: builds a language object given its two corresponding terms in language and term_language taxonomies
+ *
+ * @since 1.2
+ *
+ * @param object|array $language 'language' term or language object properties stored as an array
+ * @param object $term_language Corresponding 'term_language' term
+ */
+ public function __construct( $language, $term_language = null ) {
+ // build the object from all properties stored as an array
+ if ( empty( $term_language ) ) {
+ foreach ( $language as $prop => $value ) {
+ $this->$prop = $value;
+ }
+ }
+
+ // build the object from taxonomies
+ else {
+ foreach ( $language as $prop => $value ) {
+ $this->$prop = in_array( $prop, array( 'term_id', 'term_taxonomy_id', 'count' ) ) ? (int) $language->$prop : $language->$prop;
+ }
+
+ // although it would be convenient here, don't assume the term is shared between taxonomies as it may not be the case in future
+ // http://make.wordpress.org/core/2013/07/28/potential-roadmap-for-taxonomy-meta-and-post-relationships/
+ $this->tl_term_id = (int) $term_language->term_id;
+ $this->tl_term_taxonomy_id = (int) $term_language->term_taxonomy_id;
+ $this->tl_count = (int) $term_language->count;
+
+ // the description field can contain any property
+ // backward compatibility for is_rtl
+ $description = maybe_unserialize( $language->description );
+ foreach ( $description as $prop => $value ) {
+ 'rtl' == $prop ? $this->is_rtl = $value : $this->$prop = $value;
+ }
+
+ $this->description = &$this->locale; // backward compatibility with Polylang < 1.2
+
+ $this->mo_id = PLL_MO::get_id( $this );
+ }
+ }
+
+ /**
+ * sets flag_url and flag properties
+ *
+ * @since 1.2
+ */
+ public function set_flag() {
+ $flags['flag']['url'] = '';
+
+ // Polylang builtin flags
+ if ( ! empty( $this->flag_code ) && file_exists( POLYLANG_DIR . ( $file = '/flags/' . $this->flag_code . '.png' ) ) ) {
+ $flags['flag']['url'] = esc_url_raw( plugins_url( $file, POLYLANG_FILE ) );
+
+ // if base64 encoded flags are preferred
+ if ( ! defined( 'PLL_ENCODED_FLAGS' ) || PLL_ENCODED_FLAGS ) {
+ $flags['flag']['src'] = 'data:image/png;base64,' . base64_encode( file_get_contents( POLYLANG_DIR . $file ) );
+ } else {
+ $flags['flag']['src'] = esc_url( plugins_url( $file, POLYLANG_FILE ) );
+ }
+ }
+
+ // custom flags ?
+ if ( file_exists( PLL_LOCAL_DIR . ( $file = '/' . $this->locale . '.png' ) ) || file_exists( PLL_LOCAL_DIR . ( $file = '/' . $this->locale . '.jpg' ) ) ) {
+ $url = content_url( '/polylang' . $file );
+ $flags['custom_flag']['url'] = esc_url_raw( $url );
+ $flags['custom_flag']['src'] = esc_url( $url );
+ }
+
+ /**
+ * Filter the flag title attribute
+ * Defaults to the language name
+ *
+ * @since 0.7
+ *
+ * @param string $title the flag title attribute
+ * @param string $slug the language code
+ * @param string $locale the language locale
+ */
+ $title = apply_filters( 'pll_flag_title', $this->name, $this->slug, $this->locale );
+
+ foreach ( $flags as $key => $flag ) {
+ $this->{$key . '_url'} = empty( $flag['url'] ) ? '' : $flag['url'];
+
+ /**
+ * Filter the html markup of a flag
+ *
+ * @since 1.0.2
+ *
+ * @param string $flag html markup of the flag or empty string
+ * @param string $slug language code
+ */
+ $this->{$key} = apply_filters( 'pll_get_flag', empty( $flag['src'] ) ? '' :
+ sprintf(
+ '',
+ $flag['src'],
+ esc_attr( $title ),
+ esc_attr( $this->name )
+ ),
+ $this->slug
+ );
+ }
+ }
+
+ /**
+ * replace flag by custom flag
+ * takes care of url scheme
+ *
+ * @since 1.7
+ */
+ public function set_custom_flag() {
+ // overwrite with custom flags on frontend only
+ if ( ! empty( $this->custom_flag ) ) {
+ $this->flag = $this->custom_flag;
+ $this->flag_url = $this->custom_flag_url;
+ unset( $this->custom_flag, $this->custom_flag_url ); // hide this
+ }
+
+ // set url scheme, also for default flags
+ if ( is_ssl() ) {
+ $this->flag = str_replace( 'http://', 'https://', $this->flag );
+ $this->flag_url = str_replace( 'http://', 'https://', $this->flag_url );
+ } else {
+ $this->flag = str_replace( 'https://', 'http://', $this->flag );
+ $this->flag_url = str_replace( 'https://', 'http://', $this->flag_url );
+ }
+ }
+
+ /**
+ * updates post and term count
+ *
+ * @since 1.2
+ */
+ public function update_count() {
+ wp_update_term_count( $this->term_taxonomy_id, 'language' ); // posts count
+ wp_update_term_count( $this->tl_term_taxonomy_id, 'term_language' ); // terms count
+ }
+
+ /**
+ * set home_url and search_url properties
+ *
+ * @since 1.3
+ *
+ * @param string $search_url
+ * @param string $home_url
+ */
+ public function set_home_url( $search_url, $home_url ) {
+ $this->search_url = $search_url;
+ $this->home_url = $home_url;
+ }
+
+ /**
+ * set home_url scheme
+ * this can't be cached across pages
+ *
+ * @since 1.6.4
+ */
+ public function set_home_url_scheme() {
+ if ( is_ssl() ) {
+ $this->home_url = str_replace( 'http://', 'https://', $this->home_url );
+ $this->search_url = str_replace( 'http://', 'https://', $this->search_url );
+ }
+
+ else {
+ $this->home_url = str_replace( 'https://', 'http://', $this->home_url );
+ $this->search_url = str_replace( 'https://', 'http://', $this->search_url );
+ }
+ }
+
+ /**
+ * returns the language locale
+ * converts WP locales to W3C valid locales for display
+ * @see #33511
+ *
+ * @since 1.8
+ *
+ * @param string $filter either 'display' or 'raw', defaults to raw
+ * @return string
+ */
+ public function get_locale( $filter = 'raw' ) {
+ if ( 'display' == $filter ) {
+ static $valid_locales = array(
+ 'bel' => 'be',
+ 'bre' => 'br',
+ 'de_CH_informal' => 'de_CH',
+ 'de_DE_formal' => 'de_DE',
+ 'dzo' => 'dz',
+ 'ido' => 'io',
+ 'kin' => 'rw',
+ 'oci' => 'oc',
+ 'mri' => 'mi',
+ 'nl_NL_formal' => 'nl_NL',
+ 'roh' => 'rm',
+ 'srd' => 'sc',
+ 'tuk' => 'tk',
+ );
+ $locale = isset( $valid_locales[ $this->locale ] ) ? $valid_locales[ $this->locale ] : $this->locale;
+ return str_replace( '_', '-', $locale );
+ }
+ return $this->locale;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/license.php b/pole-sbv-content/plugins/polylang/include/license.php
new file mode 100644
index 00000000..80e48bb3
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/license.php
@@ -0,0 +1,171 @@
+id = sanitize_title( $item_name );
+ $this->file = $file;
+ $this->name = $item_name;
+ $this->version = $version;
+ $this->author = $author;
+ $this->api_url = empty( $api_url ) ? $this->api_url : $api_url;
+
+ $licenses = get_option( 'polylang_licenses' );
+ $this->license_key = empty( $licenses[ $this->id ]['key'] ) ? '' : $licenses[ $this->id ]['key'];
+ if ( ! empty( $licenses[ $this->id ]['data'] ) ) {
+ $this->license_data = $licenses[ $this->id ]['data'];
+ }
+
+ // Updater
+ add_action( 'admin_init', array( $this, 'auto_updater' ), 0 );
+
+ // Register settings
+ add_filter( 'pll_settings_licenses', array( $this, 'settings' ) );
+
+ // Weekly schedule
+ if ( ! wp_next_scheduled( 'polylang_check_licenses' ) ) {
+ wp_schedule_event( time(), 'weekly', 'polylang_check_licenses' );
+ }
+
+ add_action( 'polylang_check_licenses', array( $this, 'check_license' ) );
+ }
+
+ /**
+ * Auto updater
+ *
+ * @since 1.9
+ */
+ public function auto_updater() {
+ $args = array(
+ 'version' => $this->version,
+ 'license' => $this->license_key,
+ 'author' => $this->author,
+ 'item_name' => $this->name,
+ );
+
+ // Setup the updater
+ new PLL_Plugin_Updater( $this->api_url, $this->file, $args );
+ }
+
+ /**
+ * Registers the licence in the Settings
+ *
+ * @since 1.9
+ *
+ * @param array $items
+ * @return array
+ */
+ public function settings( $items ) {
+ $items[ $this->id ] = $this;
+ return $items;
+ }
+
+ /**
+ * Activate the license key
+ *
+ * @since 1.9
+ *
+ * @param string $license_key activation key
+ * @return object updated $this
+ */
+ public function activate_license( $license_key ) {
+ $this->license_key = $license_key;
+ $this->api_request( 'activate_license' );
+
+ // Tell WordPress to look for updates
+ set_site_transient( 'update_plugins', null );
+ return $this;
+ }
+
+
+ /**
+ * Deactivate the license key
+ *
+ * @since 1.9
+ *
+ * @return object updated $this
+ */
+ public function deactivate_license() {
+ $this->api_request( 'deactivate_license' );
+ return $this;
+ }
+
+ /**
+ * Check if license key is valid
+ *
+ * @since 1.9
+ *
+ * @return object updated $this
+ */
+ public function check_license() {
+ $this->api_request( 'check_license' );
+ return $this;
+ }
+
+ /**
+ * Sends an api request to check, activate or deactivate the license
+ * Updates the licenses option according to the status
+ *
+ * @since 1.9
+ *
+ * @param string $request check_license | activate_license | deactivate_license
+ */
+ private function api_request( $request ) {
+ $licenses = get_option( 'polylang_licenses' );
+ unset( $licenses[ $this->id ], $this->license_data );
+
+ if ( ! empty( $this->license_key ) ) {
+ // Data to send in our API request
+ $api_params = array(
+ 'edd_action' => $request,
+ 'license' => $this->license_key,
+ 'item_name' => urlencode( $this->name ),
+ 'url' => home_url(),
+ );
+
+ // Call the API
+ $response = wp_remote_post(
+ $this->api_url,
+ array(
+ 'timeout' => 15,
+ 'sslverify' => false,
+ 'body' => $api_params,
+ )
+ );
+
+ // Update the option only if we got a response
+ if ( is_wp_error( $response ) ) {
+ return;
+ }
+
+ // Save new license info
+ $licenses[ $this->id ] = array( 'key' => $this->license_key );
+ $data = json_decode( wp_remote_retrieve_body( $response ) );
+
+ if ( 'deactivated' !== $data->license ) {
+ $licenses[ $this->id ]['data'] = $this->license_data = $data;
+ }
+ }
+
+ update_option( 'polylang_licenses', $licenses ); // FIXME called multiple times when saving all licenses
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/links-abstract-domain.php b/pole-sbv-content/plugins/polylang/include/links-abstract-domain.php
new file mode 100644
index 00000000..04404e7e
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/links-abstract-domain.php
@@ -0,0 +1,68 @@
+home_url( $language );
+ $language->set_home_url( $home_url, $home_url ); // Search url and home url are the same
+ }
+
+ /**
+ * Returns the current site url
+ *
+ * @since 1.8
+ *
+ * @param string $url
+ * @return string
+ */
+ public function site_url( $url ) {
+ $lang = $this->get_language_from_url();
+ $lang = $this->model->get_language( $lang );
+ return $this->add_language_to_link( $url, $lang );
+ }
+
+ /**
+ * Fix the domain for upload directory
+ *
+ * @since 2.0.6
+ *
+ * @param array $uploads
+ * @return array
+ */
+ public function upload_dir( $uploads ) {
+ $lang = $this->get_language_from_url();
+ $lang = $this->model->get_language( $lang );
+ $uploads['url'] = $this->add_language_to_link( $uploads['url'], $lang );
+ $uploads['baseurl'] = $this->add_language_to_link( $uploads['baseurl'], $lang );
+ return $uploads;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/links-default.php b/pole-sbv-content/plugins/polylang/include/links-default.php
new file mode 100644
index 00000000..ba2e2175
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/links-default.php
@@ -0,0 +1,100 @@
+options['hide_default'] && $this->options['default_lang'] == $lang->slug ) ? $url : add_query_arg( 'lang', $lang->slug, $url );
+ }
+
+ /**
+ * Removes the language information from an url
+ * links_model interface
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @return string modified url
+ */
+ public function remove_language_from_link( $url ) {
+ return remove_query_arg( 'lang', $url );
+ }
+
+ /**
+ * Returns the link to the first page
+ * links_model interface
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @return string modified url
+ */
+ function remove_paged_from_link( $url ) {
+ return remove_query_arg( 'paged', $url );
+ }
+
+ /**
+ * Returns the link to the paged page when using pretty permalinks
+ *
+ * @since 1.5
+ *
+ * @param string $url url to modify
+ * @param int $page
+ * @return string modified url
+ */
+ public function add_paged_to_link( $url, $page ) {
+ return add_query_arg( array( 'paged' => $page ), $url );
+ }
+
+ /**
+ * Gets the language slug from the url if present
+ * links_model interface
+ *
+ * @since 1.2
+ * @since 2.0 add $url argument
+ *
+ * @param string $url optional, defaults to current url
+ * @return string language slug
+ */
+ public function get_language_from_url( $url = '' ) {
+ if ( empty( $url ) ) {
+ $url = $_SERVER['REQUEST_URI'];
+ }
+
+ $pattern = '#lang=(' . implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) . ')#';
+ return preg_match( $pattern, trailingslashit( $url ), $matches ) ? $matches[1] : ''; // $matches[1] is the slug of the requested language
+ }
+
+ /**
+ * Returns the static front page url
+ *
+ * @since 1.8
+ *
+ * @param object $lang
+ * @return string
+ */
+ public function front_page_url( $lang ) {
+ if ( $this->options['hide_default'] && $lang->slug == $this->options['default_lang'] ) {
+ return trailingslashit( $this->home );
+ }
+ $url = home_url( '/?page_id=' . $lang->page_on_front );
+ return $this->options['force_lang'] ? $this->add_language_to_link( $url, $lang ) : $url;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/links-directory.php b/pole-sbv-content/plugins/polylang/include/links-directory.php
new file mode 100644
index 00000000..9ac48180
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/links-directory.php
@@ -0,0 +1,254 @@
+init();
+ } else {
+ add_action( 'pll_init', array( $this, 'init' ) );
+ }
+ }
+
+ /**
+ * Called only at first object creation to avoid duplicating filters when switching blog
+ *
+ * @since 1.6
+ */
+ public function init() {
+ if ( did_action( 'setup_theme' ) ) {
+ $this->add_permastruct();
+ } else {
+ add_action( 'setup_theme', array( $this, 'add_permastruct' ), 2 );
+ }
+
+ // Make sure to prepare rewrite rules when flushing
+ add_action( 'pre_option_rewrite_rules', array( $this, 'prepare_rewrite_rules' ) );
+ }
+
+ /**
+ * Adds the language code in url
+ * links_model interface
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @param object $lang language
+ * @return string modified url
+ */
+ public function add_language_to_link( $url, $lang ) {
+ if ( ! empty( $lang ) ) {
+ $base = $this->options['rewrite'] ? '' : 'language/';
+ $slug = $this->options['default_lang'] == $lang->slug && $this->options['hide_default'] ? '' : $base . $lang->slug . '/';
+ if ( false === strpos( $url, $this->home . '/' . $this->root . $slug ) ) {
+ return str_replace( $this->home . '/' . $this->root, $this->home . '/' . $this->root . $slug, $url );
+ }
+ }
+ return $url;
+ }
+
+ /**
+ * Returns the url without language code
+ * links_model interface
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @return string modified url
+ */
+ function remove_language_from_link( $url ) {
+ foreach ( $this->model->get_languages_list() as $language ) {
+ if ( ! $this->options['hide_default'] || $this->options['default_lang'] != $language->slug ) {
+ $languages[] = $language->slug;
+ }
+ }
+
+ if ( ! empty( $languages ) ) {
+ $pattern = str_replace( '/', '\/', $this->home . '/' . $this->root );
+ $pattern = '#' . $pattern . ( $this->options['rewrite'] ? '' : 'language\/' ) . '(' . implode( '|', $languages ) . ')(\/|$)#';
+ $url = preg_replace( $pattern, $this->home . '/' . $this->root, $url );
+ }
+ return $url;
+ }
+
+ /**
+ * Returns the language based on language code in url
+ * links_model interface
+ *
+ * @since 1.2
+ * @since 2.0 add $url argument
+ *
+ * @param string $url optional, defaults to current url
+ * @return string language slug
+ */
+ public function get_language_from_url( $url = '' ) {
+ if ( empty( $url ) ) {
+ $path = $_SERVER['REQUEST_URI'];
+ } else {
+ $path = parse_url( $url, PHP_URL_PATH );
+ }
+
+ $pattern = parse_url( $this->home . '/' . $this->root . ( $this->options['rewrite'] ? '' : 'language/' ), PHP_URL_PATH );
+ $pattern = str_replace( '/', '\/', $pattern );
+ $pattern = '#' . $pattern . '(' . implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) . ')(\/|$)#';
+ return preg_match( $pattern, trailingslashit( $path ), $matches ) ? $matches[1] : ''; // $matches[1] is the slug of the requested language
+ }
+
+ /**
+ * Returns the home url
+ * links_model interface
+ *
+ * @since 1.3.1
+ *
+ * @param object $lang PLL_Language object
+ * @return string
+ */
+ public function home_url( $lang ) {
+ $base = $this->options['rewrite'] ? '' : 'language/';
+ $slug = $this->options['default_lang'] == $lang->slug && $this->options['hide_default'] ? '' : '/' . $this->root . $base . $lang->slug;
+ return trailingslashit( $this->home . $slug );
+ }
+
+ /**
+ * Optionaly removes 'language' in permalinks so that we get http://www.myblog/en/ instead of http://www.myblog/language/en/
+ *
+ * @since 1.2
+ */
+ function add_permastruct() {
+ // Language information always in front of the uri ( 'with_front' => false )
+ // The 3rd parameter structure has been modified in WP 3.4
+ // Leads to error 404 for pages when there is no language created yet
+ if ( $this->model->get_languages_list() ) {
+ add_permastruct( 'language', $this->options['rewrite'] ? '%language%' : 'language/%language%', array( 'with_front' => false ) );
+ }
+ }
+
+ /**
+ * Prepares rewrite rules filters
+ *
+ * @since 0.8.1
+ *
+ * @param array $pre not used
+ * @return unmodified $pre
+ */
+ public function prepare_rewrite_rules( $pre ) {
+ // Don't modify the rules if there is no languages created yet
+ // Make sure to add filter only once and if all custom post types and taxonomies have been registered
+ if ( $this->model->get_languages_list() && did_action( 'wp_loaded' ) && ! has_filter( 'language_rewrite_rules', '__return_empty_array' ) ) {
+ // Suppress the rules created by WordPress for our taxonomy
+ add_filter( 'language_rewrite_rules', '__return_empty_array' );
+
+ foreach ( $this->get_rewrite_rules_filters() as $type ) {
+ add_filter( $type . '_rewrite_rules', array( $this, 'rewrite_rules' ) );
+ }
+
+ add_filter( 'rewrite_rules_array', array( $this, 'rewrite_rules' ) ); // needed for post type archives
+ }
+ return $pre;
+ }
+
+ /**
+ * The rewrite rules !
+ * always make sure the default language is at the end in case the language information is hidden for default language
+ * thanks to brbrbr http://wordpress.org/support/topic/plugin-polylang-rewrite-rules-not-correct
+ *
+ * @since 0.8.1
+ *
+ * @param array $rules rewrite rules
+ * @return array modified rewrite rules
+ */
+ public function rewrite_rules( $rules ) {
+ $filter = str_replace( '_rewrite_rules', '', current_filter() );
+
+ global $wp_rewrite;
+ $newrules = array();
+
+ $languages = $this->model->get_languages_list( array( 'fields' => 'slug' ) );
+ if ( $this->options['hide_default'] ) {
+ $languages = array_diff( $languages, array( $this->options['default_lang'] ) );
+ }
+
+ if ( ! empty( $languages ) ) {
+ $slug = $wp_rewrite->root . ( $this->options['rewrite'] ? '' : 'language/' ) . '(' . implode( '|', $languages ) . ')/';
+ }
+
+ // For custom post type archives
+ $cpts = array_intersect( $this->model->get_translated_post_types(), get_post_types( array( '_builtin' => false ) ) );
+ $cpts = $cpts ? '#post_type=(' . implode( '|', $cpts ) . ')#' : '';
+
+ foreach ( $rules as $key => $rule ) {
+ // Special case for translated post types and taxonomies to allow canonical redirection
+ if ( $this->options['force_lang'] && in_array( $filter, array_merge( $this->model->get_translated_post_types(), $this->model->get_translated_taxonomies() ) ) ) {
+
+ /**
+ * Filters the rewrite rules to modify
+ *
+ * @since 1.9.1
+ *
+ * @param bool $modify whether to modify or not the rule, defaults to true
+ * @param array $rule original rewrite rule
+ * @param string $filter current set of rules being modified
+ * @param string|bool $archive custom post post type archive name or false if it is not a cpt archive
+ */
+ if ( isset( $slug ) && apply_filters( 'pll_modify_rewrite_rule', true, array( $key => $rule ), $filter, false ) ) {
+ $newrules[ $slug . str_replace( $wp_rewrite->root, '', ltrim( $key, '^' ) ) ] = str_replace(
+ array( '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '[1]', '?' ),
+ array( '[9]', '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '?lang=$matches[1]&' ),
+ $rule
+ ); // Should be enough!
+ }
+
+ $newrules[ $key ] = $rule;
+ }
+
+ // Rewrite rules filtered by language
+ elseif ( in_array( $filter, $this->always_rewrite ) || in_array( $filter, $this->model->get_filtered_taxonomies() ) || ( $cpts && preg_match( $cpts, $rule, $matches ) && ! strpos( $rule, 'name=' ) ) || ( 'rewrite_rules_array' != $filter && $this->options['force_lang'] ) ) {
+
+ /** This filter is documented in include/links-directory.php */
+ if ( apply_filters( 'pll_modify_rewrite_rule', true, array( $key => $rule ), $filter, empty( $matches[1] ) ? false : $matches[1] ) ) {
+ if ( isset( $slug ) ) {
+ $newrules[ $slug . str_replace( $wp_rewrite->root, '', ltrim( $key, '^' ) ) ] = str_replace(
+ array( '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '[1]', '?' ),
+ array( '[9]', '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '?lang=$matches[1]&' ),
+ $rule
+ ); // Should be enough!
+ }
+
+ if ( $this->options['hide_default'] ) {
+ $newrules[ $key ] = str_replace( '?', '?lang=' . $this->options['default_lang'] . '&', $rule );
+ }
+ } else {
+ $newrules[ $key ] = $rule;
+ }
+ }
+
+ // Unmodified rules
+ else {
+ $newrules[ $key ] = $rule;
+ }
+ }
+
+ // The home rewrite rule
+ if ( 'root' == $filter && isset( $slug ) ) {
+ $newrules[ $slug . '?$' ] = $wp_rewrite->index . '?lang=$matches[1]';
+ }
+
+ return $newrules;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/links-domain.php b/pole-sbv-content/plugins/polylang/include/links-domain.php
new file mode 100644
index 00000000..7984ea7d
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/links-domain.php
@@ -0,0 +1,104 @@
+hosts = $this->get_hosts();
+
+ // Filrer the site url ( mainly to get the correct login form )
+ add_filter( 'site_url', array( $this, 'site_url' ) );
+ }
+
+
+ /**
+ * Adds the language code in url
+ * links_model interface
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @param object $lang language
+ * @return string modified url
+ */
+ public function add_language_to_link( $url, $lang ) {
+ if ( ! empty( $lang ) && ! empty( $this->hosts[ $lang->slug ] ) ) {
+ $url = preg_replace( '#:\/\/(' . parse_url( $this->home, PHP_URL_HOST ) . ')($|\/.*)#', '://' . $this->hosts[ $lang->slug ] . '$2', $url );
+ }
+ return $url;
+ }
+
+ /**
+ * Returns the url without language code
+ * links_model interface
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @return string modified url
+ */
+ public function remove_language_from_link( $url ) {
+ if ( ! empty( $this->hosts ) ) {
+ $url = preg_replace( '#:\/\/(' . implode( '|', $this->hosts ) . ')($|\/.*)#', '://' . parse_url( $this->home, PHP_URL_HOST ) . '$2', $url );
+ }
+ return $url;
+ }
+
+ /**
+ * Returns the language based on language code in url
+ * links_model interface
+ *
+ * @since 1.2
+ * @since 2.0 add $url argument
+ *
+ * @param string $url optional, defaults to current url
+ * @return string language slug
+ */
+ public function get_language_from_url( $url = '' ) {
+ $host = empty( $url ) ? $_SERVER['HTTP_HOST'] : parse_url( $url, PHP_URL_HOST );
+ return ( $lang = array_search( $host , $this->hosts ) ) ? $lang : '';
+ }
+
+ /**
+ * Returns the home url
+ * links_model interface
+ *
+ * @since 1.3.1
+ *
+ * @param object $lang PLL_Language object
+ * @return string
+ */
+ function home_url( $lang ) {
+ return trailingslashit( empty( $this->options['domains'][ $lang->slug ] ) ? $this->home : $this->options['domains'][ $lang->slug ] );
+ }
+
+ /**
+ * Get hosts managed on the website
+ *
+ * @since 1.5
+ *
+ * @return array list of hosts
+ */
+ public function get_hosts() {
+ $hosts = array();
+ foreach ( $this->options['domains'] as $lang => $domain ) {
+ $hosts[ $lang ] = parse_url( $domain, PHP_URL_HOST );
+ }
+ return $hosts;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/links-model.php b/pole-sbv-content/plugins/polylang/include/links-model.php
new file mode 100644
index 00000000..6e850616
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/links-model.php
@@ -0,0 +1,133 @@
+model = &$model;
+ $this->options = &$model->options;
+
+ $this->home = home_url();
+
+ add_filter( 'pll_languages_list', array( $this, 'pll_languages_list' ), 4 ); // after PLL_Static_Pages
+ add_filter( 'pll_after_languages_cache', array( $this, 'pll_after_languages_cache' ) );
+
+ // adds our domains or subdomains to allowed hosts for safe redirection
+ add_filter( 'allowed_redirect_hosts', array( $this, 'allowed_redirect_hosts' ) );
+ }
+
+ /**
+ * Changes the language code in url
+ *
+ * @since 1.5
+ *
+ * @param string $url url to modify
+ * @param object $lang language
+ * @return string modified url
+ */
+ public function switch_language_in_link( $url, $lang ) {
+ $url = $this->remove_language_from_link( $url );
+ return $this->add_language_to_link( $url, $lang );
+ }
+
+ /**
+ * Get hosts managed on the website
+ *
+ * @since 1.5
+ *
+ * @return array list of hosts
+ */
+ public function get_hosts() {
+ return array( parse_url( $this->home, PHP_URL_HOST ) );
+ }
+
+ /**
+ * Returns the home url
+ *
+ * @since 1.3.1
+ *
+ * @param object $lang PLL_Language object
+ * @return string
+ */
+ public function home_url( $lang ) {
+ $url = trailingslashit( $this->home );
+ return $this->options['hide_default'] && $lang->slug == $this->options['default_lang'] ? $url : $this->add_language_to_link( $url, $lang );
+ }
+
+ /**
+ * Sets the home urls
+ *
+ * @since 1.8
+ *
+ * @param object $language
+ */
+ protected function set_home_url( $language ) {
+ $search_url = $this->home_url( $language );
+ $home_url = empty( $language->page_on_front ) || $this->options['redirect_lang'] ? $search_url : $this->front_page_url( $language );
+ $language->set_home_url( $search_url, $home_url );
+ }
+
+ /**
+ * Sets the home urls and flags before the languages are persistently cached
+ *
+ * @since 1.8
+ *
+ * @param array $languages array of PLL_Language objects
+ * @return array
+ */
+ public function pll_languages_list( $languages ) {
+ foreach ( $languages as $language ) {
+ $this->set_home_url( $language );
+ $language->set_flag();
+ }
+ return $languages;
+ }
+
+ /**
+ * Sets the home urls when not cached
+ * Sets the home urls scheme
+ *
+ * @since 1.8
+ *
+ * @param array $languages array of PLL_Language objects
+ * @return array
+ */
+ public function pll_after_languages_cache( $languages ) {
+ foreach ( $languages as $language ) {
+ // Get the home urls when not cached
+ if ( ( defined( 'PLL_CACHE_LANGUAGES' ) && ! PLL_CACHE_LANGUAGES ) || ( defined( 'PLL_CACHE_HOME_URL' ) && ! PLL_CACHE_HOME_URL ) ) {
+ $this->set_home_url( $language );
+ }
+
+ // Ensures that the ( possibly cached ) home url uses the right scheme http or https
+ $language->set_home_url_scheme();
+ }
+ return $languages;
+ }
+
+ /**
+ * Adds our domains or subdomains to allowed hosts for safe redirection
+ *
+ * @since 1.4.3
+ *
+ * @param array $hosts allowed hosts
+ * @return array
+ */
+ public function allowed_redirect_hosts( $hosts ) {
+ return array_unique( array_merge( $hosts, array_values( $this->get_hosts() ) ) );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/links-permalinks.php b/pole-sbv-content/plugins/polylang/include/links-permalinks.php
new file mode 100644
index 00000000..17489e20
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/links-permalinks.php
@@ -0,0 +1,120 @@
+root = preg_match( '#^/*' . $this->index . '#', $permalink_structure ) ? $this->index . '/' : '';
+ $this->use_trailing_slashes = ( '/' == substr( $permalink_structure, -1, 1 ) );
+ }
+
+ /**
+ * Returns the link to the first page when using pretty permalinks
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @return string modified url
+ */
+ public function remove_paged_from_link( $url ) {
+ /**
+ * Filter an url after the paged part has been removed
+ *
+ * @since 2.0.6
+ *
+ * @param string $modified_url The link to the first page
+ * @param string $orginal_url The link to the original paged page
+ */
+ return apply_filters( 'pll_remove_paged_from_link', preg_replace( '#\/page\/[0-9]+\/?#', $this->use_trailing_slashes ? '/' : '', $url ), $url );
+ }
+
+ /**
+ * Returns the link to the paged page when using pretty permalinks
+ *
+ * @since 1.5
+ *
+ * @param string $url url to modify
+ * @param int $page
+ * @return string modified url
+ */
+ public function add_paged_to_link( $url, $page ) {
+ /**
+ * Filter an url after the paged part has been added
+ *
+ * @since 2.0.6
+ *
+ * @param string $modified_url The link to the paged page
+ * @param string $orginal_url The link to the original first page
+ * @param int $page The page number
+ */
+ return apply_filters( 'pll_add_paged_to_link', user_trailingslashit( trailingslashit( $url ) . 'page/' . $page, 'paged' ), $url, $page );
+ }
+
+ /**
+ * Returns the home url
+ *
+ * @since 1.3.1
+ *
+ * @param object $lang PLL_Language object
+ * @return string
+ */
+ public function home_url( $lang ) {
+ return trailingslashit( parent::home_url( $lang ) );
+ }
+
+ /**
+ * Returns the static front page url
+ *
+ * @since 1.8
+ *
+ * @param object $lang
+ * @return string
+ */
+ public function front_page_url( $lang ) {
+ if ( $this->options['hide_default'] && $lang->slug == $this->options['default_lang'] ) {
+ return trailingslashit( $this->home );
+ }
+ $url = home_url( $this->root . get_page_uri( $lang->page_on_front ) );
+ $url = $this->use_trailing_slashes ? trailingslashit( $url ) : untrailingslashit( $url );
+ return $this->options['force_lang'] ? $this->add_language_to_link( $url, $lang ) : $url;
+ }
+
+ /**
+ * Prepares rewrite rules filters
+ *
+ * @since 1.6
+ */
+ public function get_rewrite_rules_filters() {
+ // Make sure we have the right post types and taxonomies
+ $types = array_values( array_merge( $this->model->get_translated_post_types(), $this->model->get_translated_taxonomies(), $this->model->get_filtered_taxonomies() ) );
+ $types = array_merge( $this->always_rewrite, $types );
+
+ /**
+ * Filter the list of rewrite rules filters to be used by Polylang
+ *
+ * @since 0.8.1
+ *
+ * @param array $types the list of filters (without '_rewrite_rules' at the end)
+ */
+ return apply_filters( 'pll_rewrite_rules', $types );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/links-subdomain.php b/pole-sbv-content/plugins/polylang/include/links-subdomain.php
new file mode 100644
index 00000000..76a467e4
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/links-subdomain.php
@@ -0,0 +1,95 @@
+www = ( false === strpos( $this->home, '://www.' ) ) ? '://' : '://www.';
+ }
+
+ /**
+ * Adds the language code in url
+ * links_model interface
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @param object $lang language
+ * @return string modified url
+ */
+ public function add_language_to_link( $url, $lang ) {
+ if ( ! empty( $lang ) && false === strpos( $url, '://' . $lang->slug . '.' ) ) {
+ $url = $this->options['default_lang'] == $lang->slug && $this->options['hide_default'] ? $url : str_replace( $this->www, '://' . $lang->slug . '.', $url );
+ }
+ return $url;
+ }
+
+ /**
+ * Returns the url without language code
+ * links_model interface
+ *
+ * @since 1.2
+ *
+ * @param string $url url to modify
+ * @return string modified url
+ */
+ public function remove_language_from_link( $url ) {
+ foreach ( $this->model->get_languages_list() as $language ) {
+ if ( ! $this->options['hide_default'] || $this->options['default_lang'] != $language->slug ) {
+ $languages[] = $language->slug;
+ }
+ }
+
+ if ( ! empty( $languages ) ) {
+ $url = preg_replace( '#:\/\/(' . implode( '|', $languages ) . ')\.#', $this->www, $url );
+ }
+
+ return $url;
+ }
+
+ /**
+ * Returns the language based on language code in url
+ * links_model interface
+ *
+ * @since 1.2
+ * @since 2.0 add $url argument
+ *
+ * @param string $url optional, defaults to current url
+ * @return string language slug
+ */
+ public function get_language_from_url( $url = '' ) {
+ $host = empty( $url ) ? $_SERVER['HTTP_HOST'] : parse_url( $url, PHP_URL_HOST );
+ $pattern = '#(' . implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) . ')\.#';
+ return preg_match( $pattern, trailingslashit( $host ), $matches ) ? $matches[1] : ''; // $matches[1] is the slug of the requested language
+ }
+
+ /**
+ * Get hosts managed on the website
+ *
+ * @since 1.5
+ *
+ * @return array list of hosts
+ */
+ public function get_hosts() {
+ $hosts = array();
+ foreach ( $this->model->get_languages_list() as $lang ) {
+ $hosts[] = parse_url( $this->home_url( $lang ), PHP_URL_HOST );
+ }
+ return $hosts;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/links.php b/pole-sbv-content/plugins/polylang/include/links.php
new file mode 100644
index 00000000..879d04d8
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/links.php
@@ -0,0 +1,65 @@
+links_model = &$polylang->links_model;
+ $this->model = &$polylang->model;
+ $this->options = &$polylang->options;
+ }
+
+ /**
+ * Returns the home url in the requested language
+ *
+ * @since 1.3
+ *
+ * @param object|string $language
+ * @param bool $is_search optional wether we need the home url for a search form, defaults to false
+ */
+ public function get_home_url( $language, $is_search = false ) {
+ $language = is_object( $language ) ? $language : $this->model->get_language( $language );
+ return $is_search ? $language->search_url : $language->home_url;
+ }
+
+ /**
+ * Checks if the current user can read the post
+ *
+ * @since 1.5
+ *
+ * @param int $post_id
+ * @return bool
+ */
+ public function current_user_can_read( $post_id ) {
+ $post = get_post( $post_id );
+
+ if ( 'inherit' === $post->post_status && $post->post_parent ) {
+ $post = get_post( $post->post_parent );
+ }
+
+ if ( 'inherit' === $post->post_status || in_array( $post->post_status, get_post_stati( array( 'public' => true ) ) ) ) {
+ return true;
+ }
+
+ // Follow WP practices, which shows links to private posts ( when readable ), but not for draft posts ( ex: get_adjacent_post_link() )
+ if ( in_array( $post->post_status, get_post_stati( array( 'private' => true ) ) ) ) {
+ $post_type_object = get_post_type_object( $post->post_type );
+ $user = wp_get_current_user();
+ return is_user_logged_in() && ( current_user_can( $post_type_object->cap->read_private_posts ) || $user->ID == $post->post_author ); // Comparison must not be strict!
+ }
+
+ return false;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/mo.php b/pole-sbv-content/plugins/polylang/include/mo.php
new file mode 100644
index 00000000..d307b30f
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/mo.php
@@ -0,0 +1,105 @@
+ __( 'Strings translations', 'polylang' ) );
+ register_post_type( 'polylang_mo', array( 'labels' => $labels, 'rewrite' => false, 'query_var' => false, '_pll' => true ) );
+
+ add_action( 'pll_add_language', array( $this, 'clean_cache' ) );
+ }
+ }
+
+ /**
+ * Writes a PLL_MO object into a custom post meta
+ *
+ * @since 1.2
+ *
+ * @param object $lang The language in which we want to export strings
+ */
+ public function export_to_db( $lang ) {
+ $this->add_entry( $this->make_entry( '', '' ) ); // Empty string translation, just in case
+
+ // Would be convenient to store the whole object but it would take a huge space in DB
+ // So let's keep only the strings in an array
+ $strings = array();
+ foreach ( $this->entries as $entry ) {
+ $strings[] = array( $entry->singular, $this->translate( $entry->singular ) );
+ }
+
+ $strings = wp_slash( $strings ); // Avoid breaking slashed strings in update_post_meta. See https://codex.wordpress.org/Function_Reference/update_post_meta#Character_Escaping
+
+ if ( empty( $lang->mo_id ) ) {
+ $post = array(
+ 'post_title' => 'polylang_mo_' . $lang->term_id,
+ 'post_status' => 'private', // To avoid a conflict with WP Super Cache. See https://wordpress.org/support/topic/polylang_mo-and-404s-take-2
+ 'post_type' => 'polylang_mo',
+ );
+ $mo_id = wp_insert_post( $post );
+ update_post_meta( $mo_id, '_pll_strings_translations', $strings );
+ } else {
+ update_post_meta( $lang->mo_id, '_pll_strings_translations', $strings );
+ }
+ }
+
+ /**
+ * Reads a PLL_MO object from a custom post meta
+ *
+ * @since 1.2
+ *
+ * @param object $lang The language in which we want to get strings
+ */
+ public function import_from_db( $lang ) {
+ if ( ! empty( $lang->mo_id ) ) {
+ $strings = get_post_meta( $lang->mo_id, '_pll_strings_translations', true );
+ if ( is_array( $strings ) ) {
+ foreach ( $strings as $msg ) {
+ $this->add_entry( $this->make_entry( $msg[0], $msg[1] ) );
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the post id of the post storing the strings translations
+ *
+ * @since 1.4
+ *
+ * @param object $lang
+ * @return int
+ */
+ public static function get_id( $lang ) {
+ global $wpdb;
+
+ $ids = wp_cache_get( 'polylang_mo_ids' );
+
+ if ( empty( $ids ) ) {
+ $ids = $wpdb->get_results( "SELECT post_title, ID FROM $wpdb->posts WHERE post_type='polylang_mo'", OBJECT_K );
+ wp_cache_add( 'polylang_mo_ids', $ids );
+ }
+
+ // The mo id for a language can be transiently empty
+ return isset( $ids[ 'polylang_mo_' . $lang->term_id ] ) ? $ids[ 'polylang_mo_' . $lang->term_id ]->ID : null;
+ }
+
+ /**
+ * Invalidate the cache when adding a new language
+ *
+ * @since 2.0.5
+ */
+ public function clean_cache() {
+ wp_cache_delete( 'polylang_mo_ids' );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/model.php b/pole-sbv-content/plugins/polylang/include/model.php
new file mode 100644
index 00000000..14a124ad
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/model.php
@@ -0,0 +1,608 @@
+options = &$options;
+
+ $this->cache = new PLL_Cache();
+ $this->post = new PLL_Translated_Post( $this ); // translated post sub model
+ $this->term = new PLL_Translated_Term( $this ); // translated term sub model
+
+ // we need to clean languages cache when editing a language and when modifying the permalink structure
+ add_action( 'edited_term_taxonomy', array( $this, 'clean_languages_cache' ), 10, 2 );
+ add_action( 'update_option_permalink_structure', array( $this, 'clean_languages_cache' ) );
+ add_action( 'update_option_siteurl', array( $this, 'clean_languages_cache' ) );
+ add_action( 'update_option_home', array( $this, 'clean_languages_cache' ) );
+
+ // just in case someone would like to display the language description ;- )
+ add_filter( 'language_description', '__return_empty_string' );
+ }
+
+ /**
+ * Returns the list of available languages
+ * caches the list in a db transient ( except flags ), unless PLL_CACHE_LANGUAGES is set to false
+ * caches the list ( with flags ) in the private property $languages
+ *
+ * list of parameters accepted in $args:
+ *
+ * hide_empty => hides languages with no posts if set to true ( defaults to false )
+ * fields => return only that field if set ( see PLL_Language for a list of fields )
+ *
+ * @since 0.1
+ *
+ * @param array $args
+ * @return array|string|int list of PLL_Language objects or PLL_Language object properties
+ */
+ public function get_languages_list( $args = array() ) {
+ if ( false === $languages = $this->cache->get( 'languages' ) ) {
+
+ // create the languages from taxonomies
+ if ( ( defined( 'PLL_CACHE_LANGUAGES' ) && ! PLL_CACHE_LANGUAGES ) || false === ( $languages = get_transient( 'pll_languages_list' ) ) ) {
+ $languages = get_terms( 'language', array( 'hide_empty' => false, 'orderby' => 'term_group' ) );
+ $languages = empty( $languages ) || is_wp_error( $languages ) ? array() : $languages;
+
+ $term_languages = get_terms( 'term_language', array( 'hide_empty' => false ) );
+ $term_languages = empty( $term_languages ) || is_wp_error( $term_languages ) ?
+ array() : array_combine( wp_list_pluck( $term_languages, 'slug' ), $term_languages );
+
+ if ( ! empty( $languages ) && ! empty( $term_languages ) ) {
+ // don't use array_map + create_function to instantiate an autoloaded class as it breaks badly in old versions of PHP
+ foreach ( $languages as $k => $v ) {
+ $languages[ $k ] = new PLL_Language( $v, $term_languages[ 'pll_' . $v->slug ] );
+ }
+
+ // we will need the languages list to allow its access in the filter below
+ $this->cache->set( 'languages', $languages );
+
+ /**
+ * Filter the list of languages *before* it is stored in the persistent cache
+ * /!\ this filter is fired *before* the $polylang object is available
+ *
+ * @since 1.7.5
+ *
+ * @param array $languages the list of language objects
+ * @param object $model PLL_Model object
+ */
+ $languages = apply_filters( 'pll_languages_list', $languages, $this );
+
+ // don't store directly objects as it badly break with some hosts ( GoDaddy ) due to race conditions when using object cache
+ // thanks to captin411 for catching this!
+ // see https://wordpress.org/support/topic/fatal-error-pll_model_languages_list?replies=8#post-6782255;
+ set_transient( 'pll_languages_list', array_map( 'get_object_vars', $languages ) );
+ }
+ else {
+ $languages = array(); // in case something went wrong
+ }
+ }
+
+ // create the languages directly from arrays stored in transients
+ else {
+ foreach ( $languages as $k => $v ) {
+ $languages[ $k ] = new PLL_Language( $v );
+ }
+ }
+
+ // custom flags
+ if ( ! PLL_ADMIN ) {
+ foreach ( $languages as $language ) {
+ $language->set_custom_flag();
+ }
+ }
+
+ /**
+ * Filter the list of languages *after* it is stored in the persistent cache
+ * /!\ this filter is fired *before* the $polylang object is available
+ *
+ * @since 1.8
+ *
+ * @param array $languages the list of language objects
+ */
+ $languages = apply_filters( 'pll_after_languages_cache', $languages );
+ $this->cache->set( 'languages', $languages );
+ }
+
+ $args = wp_parse_args( $args, array( 'hide_empty' => false ) );
+
+ // remove empty languages if requested
+ if ( $args['hide_empty'] ) {
+ $languages = wp_list_filter( $languages, array( 'count' => 0 ), 'NOT' );
+ }
+
+ return empty( $args['fields'] ) ? $languages : wp_list_pluck( $languages, $args['fields'] );
+ }
+
+ /**
+ * Cleans language cache
+ * can be called directly with no parameter
+ * called by the 'edited_term_taxonomy' filter with 2 parameters when count needs to be updated
+ *
+ * @since 1.2
+ *
+ * @param int $term not used
+ * @param string $taxonomy taxonomy name
+ */
+ public function clean_languages_cache( $term = 0, $taxonomy = null ) {
+ if ( empty( $taxonomy ) || 'language' == $taxonomy ) {
+ delete_transient( 'pll_languages_list' );
+ $this->cache->clean();
+ }
+ }
+
+ /**
+ * Returns the language by its term_id, tl_term_id, slug or locale
+ *
+ * @since 0.1
+ *
+ * @param int|string $value term_id, tl_term_id, slug or locale of the queried language
+ * @return object|bool PLL_Language object, false if no language found
+ */
+ public function get_language( $value ) {
+ if ( is_object( $value ) ) {
+ return $value instanceof PLL_Language ? $value : $this->get_language( $value->term_id ); // will force cast to PLL_Language
+ }
+
+ if ( false === $return = $this->cache->get( 'language:' . $value ) ) {
+ foreach ( $this->get_languages_list() as $lang ) {
+ $this->cache->set( 'language:' . $lang->term_id, $lang );
+ $this->cache->set( 'language:' . $lang->tl_term_id, $lang );
+ $this->cache->set( 'language:' . $lang->slug, $lang );
+ $this->cache->set( 'language:' . $lang->locale, $lang );
+ }
+ $return = $this->cache->get( 'language:' . $value );
+ }
+
+ return $return;
+ }
+
+ /**
+ * Adds terms clauses to get_terms to filter them by languages - used in both frontend and admin
+ *
+ * @since 1.2
+ *
+ * @param array $clauses the list of sql clauses in terms query
+ * @param object $lang PLL_Language object
+ * @return array modifed list of clauses
+ */
+ public function terms_clauses( $clauses, $lang ) {
+ if ( ! empty( $lang ) && false === strpos( $clauses['join'], 'pll_tr' ) ) {
+ $clauses['join'] .= $this->term->join_clause();
+ $clauses['where'] .= $this->term->where_clause( $lang );
+ }
+ return $clauses;
+ }
+
+ /**
+ * Returns post types that need to be translated
+ * the post types list is cached for better better performance
+ * wait for 'after_setup_theme' to apply the cache to allow themes adding the filter in functions.php
+ *
+ * @since 1.2
+ *
+ * @param bool $filter true if we should return only valid registered post types
+ * @return array post type names for which Polylang manages languages and translations
+ */
+ public function get_translated_post_types( $filter = true ) {
+ if ( false === $post_types = $this->cache->get( 'post_types' ) ) {
+ $post_types = array( 'post' => 'post', 'page' => 'page' );
+
+ if ( ! empty( $this->options['media_support'] ) ) {
+ $post_types['attachment'] = 'attachment';
+ }
+
+ if ( ! empty( $this->options['post_types'] ) && is_array( $this->options['post_types'] ) ) {
+ $post_types = array_merge( $post_types, array_combine( $this->options['post_types'], $this->options['post_types'] ) );
+ }
+
+ /**
+ * Filter the list of post types available for translation.
+ * The default are post types which have the parameter ‘public’ set to true.
+ * The filter must be added soon in the WordPress loading process:
+ * in a function hooked to ‘plugins_loaded’ or directly in functions.php for themes.
+ *
+ * @since 0.8
+ *
+ * @param array $post_types list of post type names
+ * @param bool $is_settings true when displaying the list of custom post types in Polylang settings
+ */
+ $post_types = apply_filters( 'pll_get_post_types', $post_types, false );
+
+ if ( did_action( 'after_setup_theme' ) ) {
+ $this->cache->set( 'post_types', $post_types );
+ }
+ }
+
+ return $filter ? array_intersect( $post_types, get_post_types() ) : $post_types;
+ }
+
+ /**
+ * Returns true if Polylang manages languages and translations for this post type
+ *
+ * @since 1.2
+ *
+ * @param string|array $post_type post type name or array of post type names
+ * @return bool
+ */
+ public function is_translated_post_type( $post_type ) {
+ $post_types = $this->get_translated_post_types( false );
+ return ( is_array( $post_type ) && array_intersect( $post_type, $post_types ) || in_array( $post_type, $post_types ) || 'any' === $post_type && ! empty( $post_types ) );
+ }
+
+ /**
+ * Return taxonomies that need to be translated
+ *
+ * @since 1.2
+ *
+ * @param bool $filter true if we should return only valid registered taxonmies
+ * @return array array of registered taxonomy names for which Polylang manages languages and translations
+ */
+ public function get_translated_taxonomies( $filter = true ) {
+ if ( false === $taxonomies = $this->cache->get( 'taxonomies' ) ) {
+ $taxonomies = array( 'category' => 'category', 'post_tag' => 'post_tag' );
+
+ if ( ! empty( $this->options['taxonomies'] ) && is_array( $this->options['taxonomies'] ) ) {
+ $taxonomies = array_merge( $taxonomies, array_combine( $this->options['taxonomies'], $this->options['taxonomies'] ) );
+ }
+
+ /**
+ * Filter the list of taxonomies available for translation.
+ * The default are taxonomies which have the parameter ‘public’ set to true.
+ * The filter must be added soon in the WordPress loading process:
+ * in a function hooked to ‘plugins_loaded’ or directly in functions.php for themes.
+ *
+ * @since 0.8
+ *
+ * @param array $taxonomies list of taxonomy names
+ * @param bool $is_settings true when displaying the list of custom taxonomies in Polylang settings
+ */
+ $taxonomies = apply_filters( 'pll_get_taxonomies', $taxonomies, false );
+ if ( did_action( 'after_setup_theme' ) ) {
+ $this->cache->set( 'taxonomies', $taxonomies );
+ }
+ }
+
+ return $filter ? array_intersect( $taxonomies, get_taxonomies() ) : $taxonomies;
+ }
+
+ /**
+ * Returns true if Polylang manages languages and translations for this taxonomy
+ *
+ * @since 1.2
+ *
+ * @param string|array $tax taxonomy name or array of taxonomy names
+ * @return bool
+ */
+ public function is_translated_taxonomy( $tax ) {
+ $taxonomies = $this->get_translated_taxonomies( false );
+ return ( is_array( $tax ) && array_intersect( $tax, $taxonomies ) || in_array( $tax, $taxonomies ) );
+ }
+
+ /**
+ * Return taxonomies that need to be filtered ( post_format like )
+ *
+ * @since 1.7
+ *
+ * @param bool $filter true if we should return only valid registered taxonomies
+ * @return array array of registered taxonomy names
+ */
+ public function get_filtered_taxonomies( $filter = true ) {
+ if ( did_action( 'after_setup_theme' ) ) {
+ static $taxonomies = null;
+ }
+
+ if ( empty( $taxonomies ) ) {
+ $taxonomies = array( 'post_format' => 'post_format' );
+
+ /**
+ * Filter the list of taxonomies not translatable but filtered by language.
+ * Includes only the post format by default
+ * The filter must be added soon in the WordPress loading process:
+ * in a function hooked to ‘plugins_loaded’ or directly in functions.php for themes.
+ *
+ * @since 1.7
+ *
+ * @param array $taxonomies list of taxonomy names
+ * @param bool $is_settings true when displaying the list of custom taxonomies in Polylang settings
+ */
+ $taxonomies = apply_filters( 'pll_filtered_taxonomies', $taxonomies, false );
+ }
+
+ return $filter ? array_intersect( $taxonomies, get_taxonomies() ) : $taxonomies;
+ }
+
+ /**
+ * Returns true if Polylang filters this taxonomy per language
+ *
+ * @since 1.7
+ *
+ * @param string|array $tax taxonomy name or array of taxonomy names
+ * @return bool
+ */
+ public function is_filtered_taxonomy( $tax ) {
+ $taxonomies = $this->get_filtered_taxonomies( false );
+ return ( is_array( $tax ) && array_intersect( $tax, $taxonomies ) || in_array( $tax, $taxonomies ) );
+ }
+
+ /**
+ * Returns the query vars of all filtered taxonomies
+ *
+ * @since 1.7
+ *
+ * @return array
+ */
+ public function get_filtered_taxonomies_query_vars() {
+ $query_vars = array();
+ foreach ( $this->get_filtered_taxonomies() as $filtered_tax ) {
+ $tax = get_taxonomy( $filtered_tax );
+ $query_vars[] = $tax->query_var;
+ }
+ return $query_vars;
+ }
+
+ /**
+ * Create a default category for a language
+ *
+ * @since 1.2
+ *
+ * @param object|string|int $lang language
+ */
+ public function create_default_category( $lang ) {
+ $lang = $this->get_language( $lang );
+
+ // create a new category
+ // FIXME this is translated in admin language when we would like it in $lang
+ $cat_name = __( 'Uncategorized' );
+ $cat_slug = sanitize_title( $cat_name . '-' . $lang->slug );
+ $cat = wp_insert_term( $cat_name, 'category', array( 'slug' => $cat_slug ) );
+
+ // check that the category was not previously created ( in case the language was deleted and recreated )
+ $cat = isset( $cat->error_data['term_exists'] ) ? $cat->error_data['term_exists'] : $cat['term_id'];
+
+ // set language
+ $this->term->set_language( (int) $cat, $lang );
+
+ // this is a translation of the default category
+ $default = (int) get_option( 'default_category' );
+ $translations = $this->term->get_translations( $default );
+ if ( empty( $translations ) ) {
+ if ( $lg = $this->term->get_language( $default ) ) {
+ $translations[ $lg->slug ] = $default;
+ }
+ else {
+ $translations = array();
+ }
+ }
+
+ $this->term->save_translations( (int) $cat, $translations );
+ }
+
+ /**
+ * It is possible to have several terms with the same name in the same taxonomy ( one per language )
+ * but the native term_exists will return true even if only one exists
+ * so here the function adds the language parameter
+ *
+ * @since 1.4
+ *
+ * @param string $term_name the term name
+ * @param string $taxonomy taxonomy name
+ * @param int $parent parent term id
+ * @param string|object $language the language slug or object
+ * @return null|int the term_id of the found term
+ */
+ public function term_exists( $term_name, $taxonomy, $parent, $language ) {
+ global $wpdb;
+
+ $term_name = trim( wp_unslash( $term_name ) );
+
+ $select = "SELECT t.term_id FROM $wpdb->terms AS t";
+ $join = " INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id";
+ $join .= $this->term->join_clause();
+ $where = $wpdb->prepare( ' WHERE tt.taxonomy = %s AND t.name = %s', $taxonomy, $term_name );
+ $where .= $this->term->where_clause( $this->get_language( $language ) );
+
+ if ( $parent > 0 ) {
+ $where .= $wpdb->prepare( ' AND tt.parent = %d', $parent );
+ }
+
+ return $wpdb->get_var( $select . $join . $where );
+ }
+
+ /**
+ * Gets the number of posts per language in a date, author or post type archive
+ *
+ * @since 1.2
+ *
+ * @param object $lang
+ * @param array $q WP_Query arguments ( accepted: post_type, m, year, monthnum, day, author, author_name, post_format )
+ * @return int
+ */
+ public function count_posts( $lang, $q = array() ) {
+ global $wpdb;
+
+ $q = wp_parse_args( $q, array( 'post_type' => 'post' ) );
+
+ if ( ! is_array( $q['post_type'] ) ) {
+ $q['post_type'] = array( $q['post_type'] );
+ }
+
+ foreach ( $q['post_type'] as $key => $type ) {
+ if ( ! post_type_exists( $type ) ) {
+ unset( $q['post_type'][ $key ] );
+ }
+ }
+
+ if ( empty( $q['post_type'] ) ) {
+ $q['post_type'] = array( 'post' ); // we *need* a post type
+ }
+
+ $cache_key = md5( serialize( $q ) );
+ $counts = wp_cache_get( $cache_key, 'pll_count_posts' );
+
+ if ( false === $counts ) {
+ $select = "SELECT pll_tr.term_taxonomy_id, COUNT( * ) AS num_posts FROM {$wpdb->posts}";
+ $join = $this->post->join_clause();
+ $where = " WHERE post_status = 'publish'";
+ $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_type IN ( '%s' )", join( "', '", $q['post_type'] ) );
+ $where .= $this->post->where_clause( $this->get_languages_list() );
+ $groupby = ' GROUP BY pll_tr.term_taxonomy_id';
+
+ if ( ! empty( $q['m'] ) ) {
+ $q['m'] = '' . preg_replace( '|[^0-9]|', '', $q['m'] );
+ $where .= $wpdb->prepare( " AND YEAR( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 0, 4 ) );
+ if ( strlen( $q['m'] ) > 5 ) {
+ $where .= $wpdb->prepare( " AND MONTH( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 4, 2 ) );
+ }
+ if ( strlen( $q['m'] ) > 7 ) {
+ $where .= $wpdb->prepare( " AND DAYOFMONTH( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 6, 2 ) );
+ }
+ }
+
+ if ( ! empty( $q['year'] ) ) {
+ $where .= $wpdb->prepare( " AND YEAR( {$wpdb->posts}.post_date ) = %d", $q['year'] );
+ }
+
+ if ( ! empty( $q['monthnum'] ) ) {
+ $where .= $wpdb->prepare( " AND MONTH( {$wpdb->posts}.post_date ) = %d", $q['monthnum'] );
+ }
+
+ if ( ! empty( $q['day'] ) ) {
+ $where .= $wpdb->prepare( " AND DAYOFMONTH( {$wpdb->posts}.post_date ) = %d", $q['day'] );
+ }
+
+ if ( ! empty( $q['author_name'] ) ) {
+ $author = get_user_by( 'slug', sanitize_title_for_query( $q['author_name'] ) );
+ if ( $author ) {
+ $q['author'] = $author->ID;
+ }
+ }
+
+ if ( ! empty( $q['author'] ) ) {
+ $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_author = %d", $q['author'] );
+ }
+
+ // filtered taxonomies ( post_format )
+ foreach ( $this->get_filtered_taxonomies_query_vars() as $tax_qv ) {
+
+ if ( ! empty( $q[ $tax_qv ] ) ) {
+ $join .= " INNER JOIN {$wpdb->term_relationships} AS tr ON tr.object_id = {$wpdb->posts}.ID";
+ $join .= " INNER JOIN {$wpdb->term_taxonomy} AS tt ON tt.term_taxonomy_id = tr.term_taxonomy_id";
+ $join .= " INNER JOIN {$wpdb->terms} AS t ON t.term_id = tt.term_id";
+ $where .= $wpdb->prepare( ' AND t.slug = %s', $q[ $tax_qv ] );
+ }
+ }
+
+ $res = $wpdb->get_results( $select . $join . $where . $groupby, ARRAY_A );
+ foreach ( (array) $res as $row ) {
+ $counts[ $row['term_taxonomy_id'] ] = $row['num_posts'];
+ }
+
+ wp_cache_set( $cache_key, $counts, 'pll_count_posts' );
+ }
+
+ return empty( $counts[ $lang->term_taxonomy_id ] ) ? 0 : $counts[ $lang->term_taxonomy_id ];
+ }
+
+ /**
+ * Setup the links model based on options
+ *
+ * @since 1.2
+ *
+ * @return object implementing "links_model interface"
+ */
+ public function get_links_model() {
+ $c = array( 'Directory', 'Directory', 'Subdomain', 'Domain' );
+ $class = get_option( 'permalink_structure' ) ? 'PLL_Links_' . $c[ $this->options['force_lang'] ] : 'PLL_Links_Default';
+
+ /**
+ * Filter the links model class to use
+ * /!\ this filter is fired *before* the $polylang object is available
+ *
+ * @since 2.1.1
+ *
+ * @param string $class A class name: PLL_Links_Default, PLL_Links_Directory, PLL_Links_Subdomain, PLL_Links_Domain
+ */
+ $class = apply_filters( 'pll_links_model', $class );
+
+ return new $class( $this );
+ }
+
+ /**
+ * Some backward compatibility with Polylang < 1.8
+ * allows for example to call $polylang->model->get_post_languages( $post_id ) instead of $polylang->model->post->get_language( $post_id )
+ * this works but should be slower than the direct call, thus an error is triggered in debug mode
+ *
+ * @since 1.8
+ *
+ * @param string $func Function name
+ * @param array $args Function arguments
+ */
+ public function __call( $func, $args ) {
+ $f = $func;
+
+ switch ( $func ) {
+ case 'get_object_term':
+ $o = ( false === strpos( $args[1], 'term' ) ) ? 'post' : 'term';
+ break;
+
+ case 'save_translations':
+ case 'delete_translation':
+ case 'get_translations':
+ case 'get_translation':
+ case 'join_clause':
+ $o = ( 'post' == $args[0] || $this->is_translated_post_type( $args[0] ) ) ? 'post' : ( 'term' == $args[0] || $this->is_translated_taxonomy( $args[0] ) ? 'term' : false );
+ unset( $args[0] );
+ break;
+
+ case 'set_post_language':
+ case 'get_post_language':
+ case 'set_term_language':
+ case 'get_term_language':
+ case 'delete_term_language':
+ case 'get_post':
+ case 'get_term':
+ $str = explode( '_', $func );
+ $f = empty( $str[2] ) ? $str[0] : $str[0] . '_' . $str[2];
+ $o = $str[1];
+ break;
+
+ case 'where_clause':
+ case 'get_objects_in_language':
+ $o = $args[1];
+ unset( $args[1] );
+ break;
+ }
+
+ if ( ! empty( $o ) && is_object( $this->$o ) && method_exists( $this->$o, $f ) ) {
+ if ( WP_DEBUG ) {
+ $debug = debug_backtrace();
+ $i = 1 + empty( $debug[1]['line'] ); // the file and line are in $debug[2] if the function was called using call_user_func
+
+ trigger_error( sprintf(
+ '%1$s was called incorrectly in %4$s on line %5$s: the call to $polylang->model->%1$s() has been deprecated in Polylang 1.8, use PLL()->model->%2$s->%3$s() instead.' . "\nError handler",
+ $func, $o, $f, $debug[ $i ]['file'], $debug[ $i ]['line']
+ ) );
+ }
+ return call_user_func_array( array( $this->$o, $f ), $args );
+ }
+
+ $debug = debug_backtrace();
+ trigger_error( sprintf( 'Call to undefined function PLL()->model->%1$s() in %2$s on line %3$s' . "\nError handler", $func, $debug[0]['file'], $debug[0]['line'] ), E_USER_ERROR );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/nav-menu.php b/pole-sbv-content/plugins/polylang/include/nav-menu.php
new file mode 100644
index 00000000..23b80fe4
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/nav-menu.php
@@ -0,0 +1,79 @@
+model = &$polylang->model;
+ $this->options = &$polylang->options;
+
+ // integration with WP customizer
+ add_action( 'customize_register', array( $this, 'create_nav_menu_locations' ), 5 );
+ }
+
+ /**
+ * create temporary nav menu locations ( one per location and per language ) for all non-default language
+ * to do only one time
+ *
+ * @since 1.2
+ */
+ public function create_nav_menu_locations() {
+ static $once;
+ global $_wp_registered_nav_menus;
+
+ if ( isset( $_wp_registered_nav_menus ) && ! $once ) {
+ foreach ( $_wp_registered_nav_menus as $loc => $name ) {
+ foreach ( $this->model->get_languages_list() as $lang ) {
+ $arr[ $this->combine_location( $loc, $lang ) ] = $name . ' ' . $lang->name;
+ }
+ }
+
+ $_wp_registered_nav_menus = $arr;
+ $once = true;
+ }
+ }
+
+ /**
+ * creates a temporary nav menu location from a location and a language
+ *
+ * @since 1.8
+ *
+ * @param string $loc nav menu location
+ * @param object $lang
+ * @return string
+ */
+ public function combine_location( $loc, $lang ) {
+ return $loc . ( strpos( $loc, '___' ) || $this->options['default_lang'] === $lang->slug ? '' : '___' . $lang->slug );
+ }
+
+ /**
+ * get nav menu locations and language from a temporary locaction
+ *
+ * @since 1.8
+ *
+ * @param string $loc temporary location
+ * @return array
+ * 'location' => nav menu location
+ * 'lang' => language slug
+ */
+ public function explode_location( $loc ) {
+ $infos = explode( '___', $loc );
+ if ( 1 == count( $infos ) ) {
+ $infos[] = $this->options['default_lang'];
+ }
+ return array_combine( array( 'location', 'lang' ), $infos );
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/olt-manager.php b/pole-sbv-content/plugins/polylang/include/olt-manager.php
new file mode 100644
index 00000000..7ebf9a8d
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/olt-manager.php
@@ -0,0 +1,245 @@
+default_locale = get_locale();
+
+ // Filters for text domain management
+ add_filter( 'load_textdomain_mofile', array( $this, 'load_textdomain_mofile' ), 10, 2 );
+ add_filter( 'gettext', array( $this, 'gettext' ), 10, 3 );
+ add_filter( 'gettext_with_context', array( $this, 'gettext_with_context' ), 10, 4 );
+
+ // Loads text domains
+ add_action( 'pll_language_defined', array( $this, 'load_textdomains' ), 2 ); // After PLL_Frontend::pll_language_defined
+ add_action( 'pll_no_language_defined', array( $this, 'load_textdomains' ) );
+ }
+
+ /**
+ * Access to the single instance of the class
+ *
+ * @since 1.7
+ *
+ * @return object
+ */
+ static public function instance() {
+ if ( empty( self::$instance ) ) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Loads text domains
+ *
+ * @since 0.1
+ */
+ public function load_textdomains() {
+ // Our load_textdomain_mofile filter has done its job. let's remove it before calling load_textdomain
+ remove_filter( 'load_textdomain_mofile', array( $this, 'load_textdomain_mofile' ), 10, 2 );
+ remove_filter( 'gettext', array( $this, 'gettext' ), 10, 3 );
+ remove_filter( 'gettext_with_context', array( $this, 'gettext_with_context' ), 10, 4 );
+ $new_locale = get_locale();
+
+ // Don't try to save time for en_US as some users have theme written in another language
+ // Now we can load all overriden text domains with the right language
+ if ( ! empty( $this->list_textdomains ) ) {
+
+ // Since WP 4.7 we need to reset the internal cache of _get_path_to_translation when switching from any locale to en_US
+ // See WP_Locale_Switcher::changle_locale()
+ // FIXME test _get_path_to_translation for backward compatibility with WP < 4.7
+ if ( function_exists( '_get_path_to_translation' ) ) {
+ _get_path_to_translation( null, true );
+ }
+
+ foreach ( $this->list_textdomains as $textdomain ) {
+ // Since WP 4.6, plugins translations are first loaded from wp-content/languages
+ if ( ! load_textdomain( $textdomain['domain'], str_replace( "{$this->default_locale}.mo", "$new_locale.mo", $textdomain['mo'] ) ) ) {
+ // Since WP 3.5 themes may store languages files in /wp-content/languages/themes
+ if ( ! load_textdomain( $textdomain['domain'], WP_LANG_DIR . "/themes/{$textdomain['domain']}-$new_locale.mo" ) ) {
+ // Since WP 3.7 plugins may store languages files in /wp-content/languages/plugins
+ load_textdomain( $textdomain['domain'], WP_LANG_DIR . "/plugins/{$textdomain['domain']}-$new_locale.mo" );
+ }
+ }
+ }
+ }
+
+ // First remove taxonomies and post_types labels that we don't need to translate
+ $taxonomies = get_taxonomies( array( '_pll' => true ) );
+ $post_types = get_post_types( array( '_pll' => true ) );
+
+ // We don't need to translate core taxonomies and post types labels when setting the language from the url
+ // As they will be translated when registered the second time
+ if ( ! did_action( 'setup_theme' ) ) {
+ $taxonomies = array_merge( get_taxonomies( array( '_builtin' => true ) ), $taxonomies );
+ $post_types = array_merge( get_post_types( array( '_builtin' => true ) ), $post_types );
+ }
+
+ // Translate labels of post types and taxonomies
+ foreach ( array_diff_key( $GLOBALS['wp_taxonomies'], array_flip( $taxonomies ) ) as $tax ) {
+ $this->translate_labels( $tax );
+ }
+ foreach ( array_diff_key( $GLOBALS['wp_post_types'], array_flip( $post_types ) ) as $pt ) {
+ $this->translate_labels( $pt );
+ }
+
+ // Act only if the language has not been set early ( before default textdomain loading and $wp_locale creation )
+ if ( did_action( 'after_setup_theme' ) ) {
+ // Reinitializes wp_locale for weekdays and months
+ unset( $GLOBALS['wp_locale'] );
+ $GLOBALS['wp_locale'] = new WP_Locale();
+ }
+
+ /**
+ * Fires after the post types and taxonomies labels have been translated
+ * This allows plugins to translate text the same way we do for post types and taxonomies labels
+ *
+ * @since 1.2
+ *
+ * @param array $labels list of strings to trnaslate
+ */
+ do_action_ref_array( 'pll_translate_labels', array( &$this->labels ) );
+
+ // Free memory
+ unset( $this->default_locale, $this->list_textdomains, $this->labels );
+ }
+
+ /**
+ * FIXME: Backward compatibility with Polylang for WooCommerce < 0.3.4
+ * To remove in Polylang 2.1
+ *
+ * @since 0.1
+ *
+ * @param bool $bool not used
+ * @param string $domain text domain name
+ * @param string $mofile translation file name
+ * @return bool
+ */
+ public function mofile( $bool, $domain, $mofile ) {
+ return $bool;
+ }
+
+ /**
+ * Saves all text domains in a table for later usage
+ * It replaces the 'override_load_textdomain' filter used since 0.1
+ *
+ * @since 2.0.4
+ *
+ * @param string $mofile translation file name
+ * @param string $domain text domain name
+ * @return bool
+ */
+ public function load_textdomain_mofile( $mofile, $domain ) {
+ // On multisite, 2 files are sharing the same domain so we need to distinguish them
+ if ( 'default' === $domain && false !== strpos( $mofile, '/ms-' ) ) {
+ $this->list_textdomains['ms-default'] = array( 'mo' => $mofile, 'domain' => $domain );
+ } else {
+ $this->list_textdomains[ $domain ] = array( 'mo' => $mofile, 'domain' => $domain );
+ }
+ return ''; // Hack to prevent WP loading text domains as we will load them all later
+ }
+
+ /**
+ * Saves post types and taxonomies labels for a later usage
+ *
+ * @since 0.9
+ *
+ * @param string $translation not used
+ * @param string $text string to translate
+ * @param string $domain text domain
+ * @return string unmodified $translation
+ */
+ public function gettext( $translation, $text, $domain ) {
+ if ( is_string( $text ) ) { // Avoid a warning with some buggy plugins which pass an array
+ $this->labels[ $text ] = array( 'domain' => $domain );
+ }
+ return $translation;
+ }
+
+ /**
+ * Saves post types and taxonomies labels for a later usage
+ *
+ * @since 0.9
+ *
+ * @param string $translation not used
+ * @param string $text string to translate
+ * @param string $context some comment to describe the context of string to translate
+ * @param string $domain text domain
+ * @return string unmodified $translation
+ */
+ public function gettext_with_context( $translation, $text, $context, $domain ) {
+ $this->labels[ $text ] = array( 'domain' => $domain, 'context' => $context );
+ return $translation;
+ }
+
+ /**
+ * Translates post types and taxonomies labels once the language is known
+ *
+ * @since 0.9
+ *
+ * @param object $type either a post type or a taxonomy
+ */
+ public function translate_labels( $type ) {
+ // Use static array to avoid translating several times the same ( default ) labels
+ static $translated = array();
+
+ foreach ( $type->labels as $key => $label ) {
+ if ( is_string( $label ) && isset( $this->labels[ $label ] ) ) {
+ if ( empty( $translated[ $label ] ) ) {
+ $type->labels->$key = $translated[ $label ] = isset( $this->labels[ $label ]['context'] ) ?
+ _x( $label, $this->labels[ $label ]['context'], $this->labels[ $label ]['domain'] ) :
+ __( $label, $this->labels[ $label ]['domain'] );
+ }
+ else {
+ $type->labels->$key = $translated[ $label ];
+ }
+ }
+ }
+ }
+
+ /**
+ * Allows Polylang to be the first plugin loaded ;- )
+ *
+ * @since 1.2
+ *
+ * @param array $plugins list of active plugins
+ * @return array list of active plugins
+ */
+ public function make_polylang_first( $plugins ) {
+ if ( $key = array_search( POLYLANG_BASENAME, $plugins ) ) {
+ unset( $plugins[ $key ] );
+ array_unshift( $plugins, POLYLANG_BASENAME );
+ }
+ return $plugins;
+ }
+}
diff --git a/pole-sbv-content/plugins/polylang/include/pointer.php b/pole-sbv-content/plugins/polylang/include/pointer.php
new file mode 100644
index 00000000..82e8442d
--- /dev/null
+++ b/pole-sbv-content/plugins/polylang/include/pointer.php
@@ -0,0 +1,110 @@
+ required, unique identifier of the pointer
+ * id => required, the pointer will be attached to this html id
+ * position => optional array, if used both sub parameters are required
+ * edge => 'top' or 'bottom'
+ * align => 'right' or 'left'
+ * width => optional, the width in px
+ * title => required, title
+ * content => required, content
+ * buttons => optional array of arrays, by default the pointer uses the standard dismiss button offered by WP
+ * label => the label of the button
+ * link => optional link for the button. By default, the button just dismisses the pointer
+ *
+ * @since 1.7.7
+ *
+ * @param array $args
+ */
+ public function __construct( $args ) {
+ $this->args = $args;
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
+ }
+
+ /**
+ * enqueue javascripts and styles if the pointer has not been dismissed
+ *
+ * @since 1.7.7
+ */
+ public function enqueue_scripts() {
+ $dismissed = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
+ if ( in_array( $this->args['pointer'], $dismissed ) || ! current_user_can( 'manage_options' ) ) {
+ return;
+ }
+
+ // Add pointer javascript
+ add_action( 'admin_print_footer_scripts', array( $this, 'print_js' ) );
+
+ wp_enqueue_style( 'wp-pointer' );
+ wp_enqueue_script( 'wp-pointer' );
+ }
+
+ /**
+ * adds the javascript of our pointer to the page
+ *
+ * @since 1.7.7
+ */
+ public function print_js() {
+
+ // add optional buttons
+ if ( ! empty( $this->args['buttons'] ) ) {
+ $b = "
+ var widget = pointer.pointer( 'widget' );
+ var buttons = $( '.wp-pointer-buttons', widget );
+ $( 'a.close', widget ).remove();"; // removes the WP button
+
+ // all the buttons use the standard WP ajax action to remember the pointer has been dismissed
+ foreach ( $this->args['buttons'] as $button ) {
+ $b .= sprintf( "
+ $( '' ).addClass( '%s' ).html( '%s' ).css( 'margin-left', '10px' ).click( function() {
+ $.post( ajaxurl, {
+ pointer: '%s',
+ action: 'dismiss-wp-pointer'
+ }, function( response ) {
+ %s
+ } );
+ } ).appendTo( buttons );",
+ empty( $button['link'] ) ? 'button' : 'button button-primary',
+ esc_html( $button['label'] ),
+ $this->args['pointer'],
+ empty( $button['link'] ) ? "pointer.pointer( 'close' )" : sprintf( "location.href = '%s'", $button['link'] )
+ );
+ }
+ }
+
+ $js = sprintf( "
+ //",
+ $this->args['id'],
+ sprintf( '
Our three subsidiaries, with 11 sites, employ 2 500 people within the LDC Group.
+ Our production sites are located near poultry farmers so that all stakeholders can benefit from an exchange of expertise.
+
+
+
+ "We are constantly creating and inventing across the entire production chain."
+
+
+
+
+
+
+
+
+
+
+ Preserving Britanny
+
+
+
+
Sustainable development is a key concern for SBV.
+
We strive to reduce our environmental impact and recycle waste and water.
+
Our environmental charter bears witness to our efforts in this area.
+ Réghalal, a major player on the halal market, with guaranteed strict traceability that is controlled by the Evry Courcouronnes mosque and a unique, complete range of made-in-France products. More informations on Réghalal.
+
+
+
+
+
+
+
+
+ Canard Passion, the brand specialising in duck products, offers a variety of recipes and cuts to make cooking with duck meat more accessible.
+
+
+
+
+
International :
+
+
+
+
+ Prim’S, the expert in frozen poultry products and an ambassador or French expertise in Europe with raw and cooked products.
+
+
+
+
+
+ We also offer products prepared according to your specifications for your French and European own brands in traditional supermarkets, hard discounts stores and freezer centres.
+
Passionate entrepreneurs have passed the torch on to our site directors, who are both autonomous and committed and who rely on dedicated teams to achieve success.
+
+
+
+
+
+
+
+ Complementary : what sets us apart
+
+
+
+
+
+
+ Partners, employees, and livestock farmers join forces to tackle new challenges. Together they share a common goal and values in their quest for greatness every day.
+
+
+
+
+
+
+
+
+
+ SBV helps people grow
+
+
+
+
We are helping each employee at each level, to succeed in their missions and responsibilities. We are permanently training our staff and improving their abilities.
+
+
+
+
+
+
+
+ Safety, a major priority
+
+
+
+
+
+ Commitments and measurable objectives
+
+
+
+
+
+
Our safety and security committees have implemented a risk evaluation system, especially with regard to priority action plan-related risks.
+
The effectiveness and continuity of actions taken are ensured by regular audits.
- Strict health and hygiene rules that stand out internationally
+
- Cutting-edge technical and veterinary support
+
- Respect for animal welfare throughout the subsidiary (hatching, rearing, handling, transport, slaughter)
+
- Local circuits for all phases, from production to processing
+
- We ensure biosafety in all operations everyday, from rearing to slaughter by mastering the cleaning and disinfection of transport means and stringent effectiveness controls.
+
+
+
+
+
- Well-raised and well-fed animals.
+
- Strict health and hygiene rules that stand out internationally
+
- Cutting-edge technical and veterinary support
+
- Respect for animal welfare throughout the subsidiary (hatching, rearing, handling, transport, slaughter)
+
- Local circuits for all phases, from production to processing
+
- We ensure biosafety in all operations everyday, from rearing to slaughter by mastering the cleaning and disinfection of transport means and stringent effectiveness controls.
+
+
+
+
+
+
+
+
+
+
+
+ We guarantee the origin of poultry born, raised, slaughtered and processed in France by going over and beyond compliance with French standards.
+
+
+
+
+
+
+
+
+
+
+ Traceability from farm to fork
+
+
+
Example of our chicken subsidiary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Animal welfare
+
+
+
+
+
+
+
+
+
+
+ "Animal welfare is a key consideration in our industry, from hatching to slaughter."
+
+
+
- Training and skilled personnel
+
+
+ Livestock farmers, live animal carriers and slaughterhouse employees in contact with the animals must have an officially-recognized individual professional certification and comply with all animal welfare rules and regulations following a series of training courses and tests.
+
+
+
- Controls, internal audits and third-party audits
+
+
+
+
+
+
+
+
+
Antibiotics are only used as a last resort (curative) and only to treat animals following a comprehensive veterinary check-up within a regulated framework.
+ Each treatment is justified, recorded and tracked in a register shared with the veterinarians.
+
We are a signatory of the French ministerial ECOANTIBIO2017 plan
+
+
+
+
+
+
+
+
+
+
+ Our guarantees
+
+
+
+ We carry out chemical and bacteriological tests throughout the production process in our in-house laboratory and at certified laboratories in line with bacteriological and physical-chemical monitoring plans.
+ We carry out chemical and bacteriological tests throughout the production process in our in-house laboratory and at certified laboratories in line with bacteriological and physical-chemical monitoring plans.
+
+ Our products include whole, cut, prepared, raw or cooked, fresh and frozen poultry.
+ We work with various poultry species.
+
+
+ With our R&D team of 12 individuals across all our sites,
+ we are constantly innovating to bring you the best solutions and ensure high-quality poultry products.
+
+
+
+
+
+ Heavy broiler chickens
+
+
+
+ Farm-raised chickens
+
+
+
+ Cockerels
+
+
+
+ Turkeys
+
+
+
+ Ducks, Barbary ducks, Muscovy ducks
+
+
+
+
+
+
+ Our expertise
+
+
+
+ Raw products
+
+
+
+
WEIGHED
+
Offering our customers the perfect weights on cuts and whole pieces.
+
+
+
+
MARINATED
+
Seasoning and tenderizing cuts and whole pieces.
+
+
+
+
STUFFED
+
Small portions and whole poultry.
+
+
+
+
MIXED
+
Creating the right combinations for our poultry kebabs.
+
+
+
+
CUT
+
Minced, cubed or cutlets for all uses.
+
+
+
+
+ Cooked products
+
+
+
+
BREADED
+
Different shapes and coatings on meat - and cheese - based products.
+
+
+
+
ROASTED & SMOKED
+
Various cooking processes for anatomical cuts and prepared foods.
+
+
+
+
CONFITS
+
Anatomical poultry cuts and prepared foods in confit form.
+
+
+
+
SLOW COOKED
+
Slow steam cooked poultry and cold cuts.
+
+
+
+
CHOPPED & MINCED
+
Cuts for all types of cooking and preparations weighed for all uses.
+
+
+
+
+
+
+
+ Our clients
+
+
+
+
+
+
+
+
+
+
+
INDUSTRY
+
As the leading French supplier of intermediate poultry food products, we tailor our products to your specifications and industrial constraints.
+
We offer an array of species, cuts and flavours.
+
We offer products made to order, raw and cooked, fresh and frozen.
+
We supply some of the biggest names in the prepared food industry and can do the same for you.
+
+
+
+
+
+
+
+
+
+
+
+
COMMERCIAL CATERING
+
Our products are renowned in all segments of the commercial catering industry:
+
+
Chain and independent fast food restaurants
+
Sit-down restaurants chains
+
Traditional restaurants
+
+
+ We work with numerous national distributors and wholesalers and distribute to cash-and-carry establishments to bring our offer to restaurateurs. Our expertise and reactivity allow us to supply major fast food brands.
+
We are extremely involved in this sector and can meet your needs for local or national calls for tender with portioned products of French origin to satisfy consumers in school cafeterias, corporate restaurants, hospitals and retirement homes.
+
+ We guarantee to provide you with healthy, high-quality products to ensure safe, nutritional food at the best price per portion.
+
Created in 2015 by the fusion of 6 sites of LDC and the acquisition of 5 other sites all based in Brittany, Société Bretonne de Volaille (SBV) has a major shareholder being LDC.
+
The LDC group, leader of french poultry in France, realised a turnover of 3,6 billion Euros and employs more then 18 500 people.