Archived

This topic is now archived and is closed to further replies.

  • 0

Polylang Code In Pagelines Framework Outdated


Question

Posted · Report post

Hi Pagelines,

I'm using Polylang to translate my site. It works mostly well. After the last update to Polylang 0.9.5 my website looked garbled. Contacting the dev about this he answered the following. Maybe this is interesting for you too. I deleted the mentioned code completely and it worked well. But maybe to be backward compatible it should be the replaced code. I know that I might have to delete the code again if Pagelines gets updated any day soon.

Anyway, I thought I let you know.

Jan

------Chouby wrote-------

In Pagelines code, there is an attempt to be compatible with Polylang :) However, it does not seem to work as expected.

In file includes/class.render.css.php (line 349 in 3.7.9):

if ( defined( 'PLL_INC') ) {

	global $post;

	$lang = Polylang_Base::get_post_language( $post->ID );

	return sprintf( '%s/%s/', get_home_url(), $lang->slug );

}
should be replaced by:
if (function_exists('pll_home_url'))

	return pll_home_url();

or even completely removed (Polylang supports the equivalent function of WPML 'icl_get_home_url' since 0.9.4)

Changing this may solve the issue.

----------------------------

Share this post


Link to post
Share on other sites

2 answers to this question

Posted · Report post

Removed the code, so it should use icl_get_home_url() in 2.3.6

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks for letting us know!

Share this post


Link to post
Share on other sites