Plugin Directory

Changeset 2754631


Ignore:
Timestamp:
07/11/2022 03:27:32 PM (4 years ago)
Author:
oskarn97
Message:

Fix WPML default language.

Location:
appful
Files:
44 added
3 edited

Legend:

Unmodified
Added
Removed
  • appful/trunk/appful.php

    r2754621 r2754631  
    44Plugin URI: https://appful.io/
    55Description: appful is one of the world's most remarkable & beautiful app service for Blogger and Online magazines. It is designed to create outstanding real native iOS and Android Apps based on the content of your Wordpress site or YouTube channel. appful is surprisingly simple to use and not a single line of code is required.
    6 Version: 1.1.0
     6Version: 1.1.1
    77Author: appful GmbH
    88Author URI: https://appful.io/
     
    241241    $post_types = $appful_api->post_types();
    242242
     243    $post_lang = $appful_api->wpml->post_lang( $post_id );
     244
    243245    if ( in_array( $post->post_type, $post_types ) && ! ( ( $old_status == $new_status && $old_status && $new_status && $new_status != "publish" ) || $new_status == "in-bearbeitung" || isset( $_REQUEST["push"] ) ) ) {
    244         return $appful_api->request( "cache", $params );
     246        return $appful_api->request( "cache", $params, $post_lang );
    245247    }
    246248}
  • appful/trunk/plugins/wpml.php

    r2754621 r2754631  
    2121            return $lang_infos["language_code"];
    2222        }
     23
     24        return substr( get_bloginfo( "language" ), 0, 2 ) ?? "";
    2325    }
    2426
     
    3840
    3941    public function filterVarForLang( $key, $lang ) {
    40         if ( $this->installed() && $lang != null ) {
     42        if ( $lang == null ) {
     43            return $this->filterVar( $key );
     44        }
     45
     46        if ( $this->installed() ) {
    4147            if ( $lang != $this->default_language() ) {
    4248                return $key . "_" . $lang;
  • appful/trunk/readme.txt

    r2754621 r2754631  
    66Tested up to: 5.8
    77Requires PHP: 5.6.20
    8 Stable tag: 1.1.0
     8Stable tag: 1.1.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.