JAVASCRIPT   88

plusitepress multilingual cms wpml language per domain sso

Guest on 7th May 2022 04:01:00 PM

  1. jQuery(document).ready(function ($) {
  2.         'use strict';
  3.  
  4.         $('.wpml_iframe').load(function() {
  5.                 var userStatus = 'wpml_is_user_signed_out';
  6.  
  7.                 if ( wpml_sso.is_user_logged_in ) {
  8.                         userStatus = 'wpml_is_user_signed_in';
  9.                 }
  10.  
  11.                 this.contentWindow.postMessage(JSON.stringify({userStatus: userStatus, userId: wpml_sso.current_user_id}), "*");
  12.         });
  13. });

Raw Paste


Login or Register to edit or fork this paste. It's free.