Linux 软件免费装

Absolute-to-Relative URLs

开发者 prometh
更新时间 2013年3月28日 21:43
PHP版本: 3.2 及以上
WordPress版本: 3.4.2

标签

plugin links link absolute relative url function shorten uri urls

下载

0.2 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.1

详情介绍:

If you were to use this on a website like http;//example.com/test/testing/, you would get results like these:
    • After: ../another-test/#anchor
    • After: /wp-content/themes/twentyten/style.css
    • Before: ../../../../../../../../#anchor
    • After: /#anchor
    • After ($output_type=1): ../../#anchor
All string parsing. No directory browsing. If you're looking for a plugin that will automatically convert all URLs on your WordPress site, instead check out my other plugin, WP-HTML-Compression. Before you copy this code and add it into your own, keep in mind that there will probably be future updates. Keeping the code within an installed plugin will make sure that you're notified.

安装:

  1. Download the plugin (zip file).
  2. Upload and activate the plugin through the "Plugins" menu in the WordPress admin.

常见问题:

Why isn't this automatic?

Check out WP-HTML-Compression instead.

How does this work?

Just use absolute_to_relative_url($url).

Will this plugin work for WordPress version x.x.x?

This plugin has only been tested with versions of WordPress as early as 3.2. For anything older, you'll have to see for yourself.

更新日志:

0.3.4 0.3.3 0.3.2 0.3.1 0.3 0.2 0.1