[wordpress插件] Bit.ly Shortlinks Multisite (Uses OAuth 2 API)Bit.ly短链接多站点(使用OAuth 2 API)

wordpress 插件 文章 2020-03-05 18:00 523 0 全屏看文

AI助手支持GPT4.0

评分
74
描述

WordPress generates shortlinks for your posts and pages.

WordPress为您的帖子和页面生成短链接。

By default it uses the ?p= with the post ID added to it, but if you have a rather long domain name this isn’t very useful.

默认情况下,它使用?p = 并添加了帖子ID,但是如果您的域名很长,那么它就不是很有用。

If you use Bit.ly, this plugin will help you replace the shortlink WordPress generates with a proper Bit.ly shortlink.

如果您使用 Bit.ly ,此插件将帮助您将WordPress生成的短链接替换为适当的Bit.ly短链接。

p>

>

This plugin uses the latest Bit.ly OAuth 2 draft specification API instead of its deprecated V3 API and enables you to use generic access token to automatically enable Bit.ly shortlinks in your entire multisite network without the need for each site user to

此插件使用最新的Bit.ly OAuth 2草案规范API而不是其过时的V3 API,并允许您使用通用访问令牌在整个多站点网络中自动启用Bit.ly短链接,而无需每个站点用户

have to tinker with any settings or authentication configurations.

必须修改任何设置或身份验证配置。

安装步骤

    1. Upload the plugin folder to the /wp-content/plugins/ directory
    2. plugin 文件夹上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Insert this code to define your bit.ly generic access token in your wp-config.php at the end right above “That’s all, stop editing!

      在“代码” wp-config.php 中的“最后,停止编辑!”后面插入此代码,以定义您的bit.ly通用访问令牌。

      Happy blogging.”:

      祝您博客愉快。”:

      define(‘BITLY_ACCESS_TOKEN’, ‘your_generic_access_token_goes_here’);

      定义(“ BITLY_ACCESS_TOKEN”,“ your_generic_access_token_goes_here”);

    You can get your generic access token here: https://bitly.com/a/oauth_apps

    您可以在此处获取通用访问令牌: https://bitly.com/a/oauth_apps

    Multisite Installation

    多站点安装

    Install and set up your access token the same way as a single site installation but make sure you Network Activate the plugin.

    以与单个站点安装相同的方式安装和设置访问令牌,但请确保您通过网络激活插件。

    How To Call Bitly Shortlinks In Your Templates

    如何在模板中调用位短链接

    I’ve included the function get_bitly($url) to help developers easily shorten URLs in their templates.

    我已包含函数 get_bitly($ url),以帮助开发人员轻松缩短其模板中的URL。

    Example Usage:

    示例用法:

      <?php    

    $url = 'http://YourLongURL.com';    

    $ url ='http://YourLongURL.com';    

    echo get_bitly($url);

    回声get_bitly($ url);

    // display your shortened URL

    //显示缩短的网址

    ?>

    ?>

下载地址
https://downloads.wordpress.org/plugin/bitly-shortlinks-multisite.1.2.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] application-cache-plugin应用程序缓存插件
[wordpress插件] Coupon Card优惠券卡
[wordpress插件] Cross-theme Stylesheets跨主题样式表
[wordpress插件] BIOY生物
[wordpress插件] Codup WooCommerce Dynamic Pricing Table ViewCodup WooCommerce动态定价表视图
随便看看
激励视频播放 偶尔会卡住不播放一段时间 341
关于MP广告投放转化率吐个槽...简直.... 413
投的广告,这都是什么啊,不能再假了 322
广告乱插,不合时宜,合适吗? 359
为什么从企微跳转到个微打开的h5地址无法长按识别二维码?直接个微打开就可以 592
论坛小程序,选择社交-论坛,社交笔记。可以发图文及短视频吗? 414
举报251个盗版侵权电影院影视的公众号(含通过公众号卖黄色电影资源的),请管理员处理? 7048
腾讯的人工客服?我笑了 375
视频号直播放电影有啥要求? 846
商户平台的“运营账户”自动开通了是什么原因? 460