protected function replaceJquery(array &$data, Controller $controller)
    {
        if (!$controller->isCurrentTheme('mobile') || empty($data['_js_top']) || $controller->isInternalRoute()) {
            return false;
        }

        $jquery = $this->library->get('jquery');

        foreach ($data['_js_top'] as $key => $asset) {
            if (dirname($asset['file']) === $jquery['basepath']) {

                $asset['file'] = __DIR__ . '/js/jquery.js';
                $asset['key'] = $asset['asset'] = gplcart_path_normalize(gplcart_path_relative($asset['file']));
                $data['_js_top'][$asset['key']] = $asset;

                unset($data['_js_top'][$key]);
                return true;
            }
        }

        return false;
    }
protected function replaceJquery(array &$data, Controller $controller)
    {
        if (!$controller->isCurrentTheme('mobile') || empty($data['_js_top']) || $controller->isInternalRoute()) {
            return false;
        }

        $jquery = $this->library->get('jquery');

        foreach ($data['_js_top'] as $key => $asset) {
            if (dirname($asset['file']) === $jquery['basepath']) {

                $asset['file'] = __DIR__ . '/js/jquery.js';
                $asset['key'] = $asset['asset'] = gplcart_path_normalize(gplcart_path_relative($asset['file']));
                $data['_js_top'][$asset['key']] = $asset;

                unset($data['_js_top'][$key]);
                return true;
            }
        }

        return false;
    }
protected function replaceJquery ( array & $ data , Controller $ controller ) { if ( ! $ controller -> isCurrentTheme ( 'mobile' ) || empty ( $ data [ '_js_top' ] ) || $ controller -> isInternalRoute ( ) ) { return false ; } $ jquery = $ this -> library -> get ( 'jquery' ) ; foreach ( $ data [ '_js_top' ] as $ key => $ asset ) { if ( dirname ( $ asset [ 'file' ] ) === $ jquery [ 'basepath' ] ) { $ asset [ 'file' ] = __DIR__ . '/js/jquery.js' ; $ asset [ 'key' ] = $ asset [ 'asset' ] = gplcart_path_normalize ( gplcart_path_relative ( $ asset [ 'file' ] ) ) ; $ data [ '_js_top' ] [ $ asset [ 'key' ] ] = $ asset ; unset ( $ data [ '_js_top' ] [ $ key ] ) ; return true ; } } return false ; }
Downgrade jQuery
Jquery Mobile 1.4.5 does not work correctly with Jquery 2.2.4
@link https://github.com/jquery/jquery/issues/2936
@param array $data
@param \gplcart\core\Controller $controller
@return bool
Downgrade jQuery Jquery Mobile 1 . 4 . 5 does not work correctly with Jquery 2 . 2 . 4