這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP-Camo

描述

Supplies filters

Orignal use case was WordPress themes that used images from facebook which in schools was blocked. By proxying the image through wp-camo images from Facebook will now load in school.

安裝

  1. Upload the plugin files to the /wp-content/plugins/wp-camo directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the Settings->WP-Camo screen to configure the plugin

There are two settings that can be configured

  • Prevent Mixed Content Errors, which applies a filter to the_content which finds all http:// images and changes them to wp-camo images.
  • Apply WP-Camo to these domains, which will pass images on these domains through wp-camo regardless of if its hosted on https.

In your theme/plugin you can use the filter wp_camo_hash_url to get the location of the image through WP-Camo.

apply_filters('wp_camo_hash_url', $url);

The image’s url will be a location in /wp-content/uploads/wp-camo/. The image will be downloaded and cached on the server to reduce load.

There are 2 filters for changing the path wp-camo uploads images to.

  • wp_camo_disk_path which sets the on disk path of the wp-camo directory.
  • wp_camo_public_path which sets the public url of the wp-camo directory.

常見問題

Images don’t appear

This could be for a few reasons, the most common are:

  • WP-Camo could not write to the disk.
  • Your web server could not request the image.

評價

There are no reviews for this plugin.

貢獻者及開發者

“WP-Camo” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 WP-Camo 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0.0

  • Cache the images on the server instead of fetching them anew each request.