Navigation überspringen

Open

Topic Tags: Compatibility

Overview of the issue

Blank spaces implemented using non-breaking spaces in BeTheme’s BeBuilder, are not being copied to the translated versions of the pages.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/themes/betheme/functions/theme-functions.php file.
  • Loof for line 3784.
  • Replace this code:
    /*
     * WPML | Workaround for compsupp-5901
     */
     
    function mfn_wpml_encode_custom_field( $custom_field_val, $custom_field_name ) {
      if ( $custom_field_name === 'mfn-page-items' ) {
          $custom_field_val = maybe_unserialize( base64_decode($custom_field_val) );
        }
        return $custom_field_val;
    }
    add_filter( 'wpml_encode_custom_field', 'mfn_wpml_encode_custom_field', 10, 2 );
     
    function mfn_wpml_decode_custom_field( $custom_field_val, $custom_field_name ) {
        if ( $custom_field_name === 'mfn-page-items' ) {
            $custom_field_val = base64_encode( serialize($custom_field_val) );
        }
        return $custom_field_val;
    }
    add_filter( 'wpml_decode_custom_field', 'mfn_wpml_decode_custom_field', 10, 2 );
    
  • With:
    /*
     * WPML | Workaround for compsupp-12016
     */
    
    function mfn_wpml_encode_custom_field( $custom_field_val, $custom_field_name ) {
      if ( $custom_field_name === 'mfn-page-items' ) {
    	$custom_field_val = mb_convert_encoding($custom_field_val, 'UTF-8', 'auto');
    	$custom_field_val = base64_encode( serialize($custom_field_val) );
      }
      return $custom_field_val;
    }
    add_filter( 'wpml_encode_custom_field', 'mfn_wpml_encode_custom_field', 10, 2 );
    
    function mfn_wpml_decode_custom_field( $custom_field_val, $custom_field_name ) {
    	if ( $custom_field_name === 'mfn-page-items' && is_string($custom_field_val) ) {
    		$custom_field_val = mb_convert_encoding($custom_field_val, 'UTF-8', 'auto');
    		$custom_field_val = maybe_unserialize( base64_decode($custom_field_val) );
    	}
    	return $custom_field_val;
    }
    add_filter( 'wpml_decode_custom_field', 'mfn_wpml_decode_custom_field', 10, 2 );
    

Eine Antwort hinterlassen

Bitte bleiben Sie beim Thema und verhalten Sie sich anderen gegenüber respektvoll. Wenn Sie Hilfe bei Problemen benötigen, die nicht mit diesem Beitrag zusammenhängen, nutzen Sie unser Support-Forum, um einen Chat zu starten oder ein Ticket einzureichen.

Sie können diese Tags verwenden:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>