
內容簡介
Image Formatr 是一個簡單的外掛,通過對文章和頁面中所有內容圖像的處理,不需要使用者任何更改:
使用 CSS 給它們一個標準化的縮略圖格式
使用標題在每個圖像下方添加標題
使它們鏈接以便在全尺寸中彈出
它不會生成縮略圖,但如果在媒體庫中可用,縮略圖將會被使用。
該插件由 prettyPhoto 庫驅動,因此我們可以稱該插件為一個 prettyPhoto 整合外掛。
*注意:支援 Flickr 上的圖像。
使用方法
這僅適用於您放置在內容中的圖像,而不是主題圖形。
<img
src="/images/picture.jpg"
class="alignright"
title="A sample caption"
link="http://example.com/"
hint="Image borrowed from example.com"
/>
在該外掛運行後,瀏覽器輸出如下:
<div class="img alignright">
<a
href="/images/picture.jpg"
rel="prettyPhoto[main]">
<img
src="/images/picture.jpg"
title="Image borrowed from example.com" alt=""
width="140" height="90"/>
</a>
<div style="width: 100%;">
<a href="http://example.com/" target="_blank">A sample caption</a>
</div>
</div>
文檔
您可以在 http://warriorself.com/blog/about/image-formatr/ 找到插件文檔。
特點
標準化所有縮略圖而不更改文章
支援顯示來自 Flickr 的圖像:<img flickr=”1234567890″
title=”The magnificent Ceiba at the Archaeological Site of Palenque.”>
使用圖像 title 或 alt 生成圖像說明
整合 WordPress 媒體庫縮略圖
為 WordPress 圖庫圖像提供彈出窗口(將優先順序設置為 12)
在博客中將所有內容圖像顯示為小型縮略圖
(不會創建新的縮略圖,但可以使用媒體庫的縮略圖)
允許對每個圖像的格式進行精細控制
使用prettyPhoto庫,單擊圖像即可將其放大
輸出標準的XHTML兼容標記
圖庫支持
為了讓 WordPress 圖庫圖像可以彈出,該插件必須在優先順序上運行(後於) 短代碼, 短代碼在優先順序11運行。因此,在管理選項中設置 priority 設置為 12。
覆蓋
插件的操作可以通過管理設置啟用和禁用,但可以通過每個單獨的圖像進行覆蓋。
usemysize - true/false - true = 不忽略圖像寬度和高度
usemya - true/false - true = 不忽略父錨點
nocap - true/false - true = 不創建標題
nofx - true/false - true = 沒有彈出效果
link - string url - 使標題成為該 URL 的鏈接
hint - string txt - 這將是新的圖像標題
asis - true/false - true = 不更改任何內容
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Image Formatr is a simple plugin that goes through all the content images on
posts & pages, and with zero user changes:
gives them a standardized thumbnail format using CSS
puts a caption underneath each one using the title
makes them linked so they popup in full size
Thumbnails are not generated, but will be used if available in the media library.
This plugin is driven by the prettyPhoto
library so we could call this plugin a prettyPhoto integration plugin.
*Note: Supports images on Flickr.
Usage
This only applies to the images you put in your content, not theme graphics.

After the plugin runs, the output to the browser looks like:
Documentation
You can find plugin documentation at http://warriorself.com/blog/about/image-formatr/
Features
Standardizes all thumbnails without altering posts
Supports displaying images from Flickr:
Generates image captions using the image title or alt
Integrates WordPress media library thumbnails
Gives popups for WordPress gallery images (adjust priority setting to 12)
Shows all content images on the blog as small thumbnails
(does not create new thumbnails but can use Media Library for thumbs)
Allows for fine-grained control of each image’s format
Zooms image to large size when clicked using the
prettyPhoto
library
Outputs standard XHTML compliant markup
Gallery Support
To get WordPress Gallery images to popup, this plugin must run at a priority
greater (later) than the shortcode which runs at priority 11. Therefore
set the priority setting to 12 in the Administration Options.
Overrides
The actions of the plugin are enabled and disabled with administration settings
but can be overridden on each individual image.
usemysize – true/false – true = do not ignore an image width and height
usemya – true/false – true = do not ignore a parent anchor tag
nocap – true/false – true = do not create a caption
nofx – true/false – true = no popup effect
link – string url – make the caption a link to the url
hint – string txt – this will be the new image title
asis – true/false – true = don’t change nuthin
group – string txt – separate popup slideshows
thumb – string url – image thumbnail (version 0.9.7)
page – single/!single/front/!front – page filtering (version 0.9.7)
If you want to surround an image with an anchor tag , then you should add
a usemya attribute within the image tag or else your anchor will be ignored
and replaced. If you do not want the popup effect at all, add a nofx attribute
to the image. If you do not want any caption, you can specify nocap, or just
leave the title blank. And to have the plugin completely ignore an image and
output the content directly from the post, use the asis attribute.
Example

Note: concerning the true/false overrides, do not include “false” parameters
like , i.e these overrides should only include the attributes
for which you want to designate a “true” value.
Credits
Image Formatr is Copyright 2014 Steven Almeroth and
licensed under a GPL license.
Based on: image-caption
by Yaosan Yeo.
PrettyPhoto: The JavaScript
Image thumbnail viewer
library by Stephane Caron is licensed under GPLv2.
Website
More information, including how to contact me, is available at
warriorself.com.
Translations
If you would like to contribute a translation of the administration settings
screen please have a look at the
.pot
file and post to the support forum
of e-mail to me.
ToDo List
add screenshot of output image with caption
Wish List
phone-home feature, activate/deactivate stats helper with version number
add admin option for html/xhtml closing tags
add admin option for moving title attribute to alt attribute should it
overwrite an existing alt?
debug mode could show images not found and whatnots and profiling stats
change [flickrset id=”1234″] to [flickr set=”1234″]
change [flickr pid=”123″] to [flickr img=”123″]
show “the_content” ordering vis a vie wp-hooks-filters-flow.php
Priority 8 :
WP_Embed->run_shortcode()
WP_Embed->autoembed()
Priority 10 :
wptexturize()
convert_smilies()
convert_chars()
wpautop()
shortcode_unautop()
prepend_attachment()
Priority 11 :
capital_P_dangit()
do_shortcode()
Priority 20 :
ImageFormatr->filter()
Bug List
bug: add_settings_field()
