• [email protected]

    (@jokytam168gmailcom)


    In option-tree, version: 2.0.16, line: 159
    define( 'OT_LANG_DIR', dirname( plugin_basename( __FILE__ ) ) . '/languages/' );

    Base on the WordPress function plugin_basename, it will strip first / in the value, so it could not found any language files in OT_THEME_MODE=true.

    I made a simply change in ot-loader.php
    line 343, I add a slash in front of OT_LANG_DIR :

    public function load_textdomain() {
          if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) {
            load_plugin_textdomain( 'option-tree', false, OT_LANG_DIR . 'plugin' );
          } else {
    			load_theme_textdomain( 'option-tree', '/' . OT_LANG_DIR . 'theme-mode' );
          }
        }

    http://ww.wp.xz.cn/extend/plugins/option-tree/

The topic ‘bug for language file’ is closed to new replies.