Linux 软件免费装
Banner图

Bit.ly Shortlinks Multisite (Uses OAuth 2 API)

开发者 spiffyd
更新时间 2013年7月3日 04:37
捐献地址: 去捐款
PHP版本: 3.0 及以上
WordPress版本: 3.5.2
版权: GPLv3 or later
版权网址: 版权信息

标签

multisite shortlink url shortener bitly oauth2 shortlinks

下载

1.0 1.1 1.2

详情介绍:

WordPress generates shortlinks for your posts and pages. 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. If you use Bit.ly, this plugin will help you replace the shortlink WordPress generates with a proper Bit.ly shortlink. 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 have to tinker with any settings or authentication configurations.

安装:

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. 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! Happy blogging.":
define('BITLY_ACCESS_TOKEN', 'your_generic_access_token_goes_here'); You can get your generic access token here: 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. Example Usage: <?php $url = 'http://YourLongURL.com'; echo get_bitly($url); // display your shortened URL ?>

屏幕截图:

  • Screenshot of Bit.ly shortlinks in action.

更新日志:

1.2 1.1 1.0