Ultimate Member 終極會員 後臺設定慢的問題,替換 Google API 和字型源。

標籤: ,

正在檢視 1 個帖子:1-1 (共 1 個帖子)
  • 作者
    帖子
  • 詩語
    管理員
    • 文章數量: 5,925
    @feibisi
    樓主

    Ultimate Member 終極會員 後臺設定慢的問題是由於使用的框架 ReduxFramework 內建的 Google API 所以對於中文使用者來說載入就非常慢。

    這裡我們主要是說下需要修改的檔案和位置:

     

    在檔案 /ultimate-member/admin/core/lib/ReduxFramework/ReduxCore/core/enqueue.php 的 291 行:

    'https://googleajax.admincdn.com/ajax/libs/webfont/1.5.0/webfont.js',

    替換為

    'https://ajax.useso.com/ajax/libs/webfont/1.5.0/webfont.js',

     

    在檔案 /ultimate-member/admin/core/lib/ReduxFramework/ReduxCore/framework.php 的 1661 行 :

    wf.src = 'https://googleajax.admincdn.com/ajax/libs/webfont/1.5.3/webfont.js';

    替換為

    wf.src = 'https://ajax.useso.com/ajax/libs/webfont/1.5.3/webfont.js';

     

    在檔案 /ultimate-member/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/typography/field_typography.php

    共有兩處 616 行:

    return '//googlefonts.admincdn.com/css?family=' . str_replace( '|', '%7C', $link );

     

    替換為

    return '//fonts.useso.com/css?family=' . str_replace( '|', '%7C', $link );

    952 行:

    $result = wp_remote_get( apply_filters( 'redux-google-fonts-api-url', 'https://www.googleapis.com/webfonts/v1/webfonts?key=' ) . $this->parent->args['google_api_key'], array( 'sslverify' => false ) );

     

    替換為:

    $result = wp_remote_get( apply_filters( 'redux-google-fonts-api-url', '#' ) . $this->parent->args['google_api_key'], array( 'sslverify' => false ) );

     

    就是把 googleapis.com 替換為 useso.com 就行。

正在檢視 1 個帖子:1-1 (共 1 個帖子)
  • 哎呀,回覆話題必需登入。

話題資訊

  • 當前位於:Ultimate Member
  • 0 條回覆
  • 1 個參與人
  • 最後回覆:<a href="https://bbs.weixiaoduo.com/users/feibisi/" title=" 檢視詩語的個人資料" class="bbp-author-link"><span class="bbp-author-name"> 詩語</span></a>
  • 上次活動:<a href="https://bbs.weixiaoduo.com/topic/17471/" title="Ultimate Member 終極會員 後臺設定慢的問題,替換 Google API 和字型源。">9 年、 2 月前</a>