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

wordpress 插件 文章 2020-03-05 18:00 472 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插件] BuddyPress No Captcha reCaptchaBuddyPress No Captcha reCaptcha
[wordpress插件] Animations by Imoptimal不尽人意的动画
[wordpress插件] Backlink Rechecker反向链接重新检查器
[wordpress插件] Aquila Admin Theme天鹰座管理员主题
[wordpress插件] CodeMirror for CodeEditorCodeMirror for CodeEditor
随便看看
微信公众号免300认证教程 4950
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4066
小程序广告组件通过审核,但是小程序内没有显示广告? 4146
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8012
问题? 7247
如何快速搭建抽奖助手小程序(无需代码知识) 5033
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 5984
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5505
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5201
如何解决渲染层网络错误Failed to load media? 16556