开发者 |
willnorris
pfefferle |
---|---|
更新时间 | 2024年7月17日 15:59 |
PHP版本: | 5.6 及以上 |
WordPress版本: | 6.6 |
版权: | MIT |
版权网址: | 版权信息 |
HUM_SHORTLINK_BASE
constant in your wp-config.php
:
define('HUM_SHORTLINK_BASE', 'http://wjn.me');
You will also need to setup your short domain to redirect to your normal domain. Many domain registrars provide free redirection services that work well for this, so you don't need to setup a new domain with your web host. Just make sure that you are not using an iframe style redirect.Out of the box, Hum will provide shortlinks for any content locally hosted on WordPress. Most shortlinks will use the b
type prefix, with the exception of posts with a 'status' post format, which have shortlinks using the t
type prefix. For example:
i
type prefix, along with one of four subtypes, is supported as follows:
asin
or a
for Amazon ASIN numbersisbn
or i
for ISBN numbersi
URLs are redirected to Amazon.com. For example:
Additional type prefixes can be registered to serve WordPress hosted content or to redirect to an external service. See more in the developer documentation.
wp_get_shortlink
hook, when loaded in the frontendamazon_domain
filter, to support different countrieshum_process_redirect
action, to overwrite default rewrite method (see #17)HUM_SHORTLINK_BASE
constant or
via the General Settings admin page./i/
URLs (redirects to Amazon for ASIN or ISBN
identifiers, optionally including an Amazon affiliate ID)hum_local_types
filter for registering other prefixes thatt are
served locally by WordPress