Custom data for `PLL_Language`
-
Hello Polylang,
In Polylang v3.3, the PHP attribute
#[\AllowDynamicProperties]was added to thePLL_Languageclass to allow properties to be dynamically added in order to accommodate PHP 8.2’s deprecation of dynamic properties.In Polylang v3.4, this PHP attribute was removed. Furthermore, the hook
pll_language_listhas been deprecated in favour of a new hookpll_additional_language_datawhich is limited to a handful of official properties (home_url,search_url,page_on_front,page_for_posts).Since Polylang v2, we had been using the
PLL_Languageinstances, via the hookpll_language_list, to add custom data—specifically, to store the translated page IDs for a custom “page for <custom post type>” feature we built.With the changes introduced in Polylang v3.4, this hinders our solution.
Is there an alternative mechanism within Polylang that we could use or will we have to implement a new solution?
Thanks,
The topic ‘Custom data for `PLL_Language`’ is closed to new replies.