Ultimate Member 终极会员 后台设置慢的问题,替换 Google API 和字体源。

Ultimate Member 终极会员 后台设置慢的问题,替换 Google API 和字体源。


标签: ,

正在查看 1 个帖子:1-1 (共 1 个帖子)
  • 作者
    帖子
  • 诗语
    管理员
    • 文章数量: 5,866
    @feibisi
    楼主

    Ultimate Member 终极会员 后台设置慢的问题是由于使用的框架 ReduxFramework 内置的Google API 所以对于中文用户来说加载就非常慢。

    这里我们主要是说下需要修改的文件和位置:

     

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

    'https://ajax.googleapis.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://ajax.googleapis.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 '//fonts.googleapis.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 个帖子)
  • 哎呀,回复话题必需登录。

未找到对应子版块?请直接在 [疑难杂症] 版块中发帖提问。

收藏纪念品


有奖活动

参与论坛社区问答,有机会获赠文派瓦普(Wapuu.com)手办模型。

话题信息

商业系统