Jump to content
janpeeters

Polylang Code In Pagelines Framework Outdated

Recommended Posts

janpeeters+    31
janpeeters

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
Simon    247
Simon

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • dougalperman
      By dougalperman+
      Hi there,
      I'm a big fan of Pagelines, and have been for years.
      I'm trying to control the size of video embeds and having some difficulty. I see that I can just paste the Vimeo video URL into the post and an embed widget will automatically appear, which is great. But the embed box created is much taller that the video (689 x 1000 pixels) so the content sits in the middle of a tall black box, which looks awkward.
      I tried using the full iFrame embed code from Vimeo, which solved the disproportionate embed frame size (or aspect ratio) issue, but despite specifying the dimensions I want (690 x 388), the videos displayed on the post are sized at 300 x 150 pixels.
      I can't work out how to change either.
      I'm using the latest version of Pagelines Framework (Pro) with the Agency them.
      Any help or advice very much appreciated.
      Thanks,
      Dougal
    • DanatTLFN
      By DanatTLFN
      Site URL: thelocalfilmnetwork.com
      DMS Firmware: 2.2.1
      Wordpress: 4.5.1
      --------------------------------------
      Ticket Reference: 
       
      At the bottom of this post, there is a CSS only option that I have implemented into my site. It looks brilliant, and I am super grateful for that addition to the thread. The only issue I am having is that the code he provides does not include all of the styling options for the button itself.
      My question is, how might I go about editing the styling of the button i.e. shadows, every element of the coloring, and border colors?
      No big deal if it's not easy to fix. Happy to provide any further information if necessary.
      Kind regards,
      Dan
      P.S. I have opened up the button in Google Dev window with Inspect and start editing it there, but it looks like there are some areas of the code that are connected to an external source (most likely bootstrap) and therefore I can't seem to edit it as much as I would like.
    • micstepl
      By micstepl+
      What is actually framework?
      - is ist that, what we used some years ago?
      - dös it replace DMS2?
      Usage
      - can I use framework beside of DMS2?
      - how do they relate?
    • almanada
      By almanada+
      2 year DMS Framework Dev Member here:
      Nothing is saving on our websites, our Key is no longer registering, emails have gone unanswered.  The DMS theme seems to be overall malfunctioning.   I just want it to work like it worked last week again please. Also, based on our your website is looking, it's also falling apart. Please Advise ASAP!  Our clients have a much shorter temper with us, because we actually offer a way to contact us.  We have reinstalled the latest theme over and over. 
    • oksodavid
      By oksodavid
      I can activate Framework 5.0.2 as stand alone theme ok. I get dashboard notice 'You need PageLines Connect' which is superseded by pl-platform - connect plugin.
      If I activate pl-platform 5.0.3, I get the 'total_pages' js error mentioned in pl-platform 5.0.2 plug and can't load Extend.
      I loaded PageLines Platform Developer 0.5.1, and dev loads ok.
×