[WordPress] 外掛分享: Before/After

首頁外掛目錄 › Before/After
10+
安裝啟用
尚無評分
5914 天前
最後更新
問題解決
WordPress 2.5+ v0.2 上架:2009-11-30

內容簡介

使用 WordPress 中的「Before/After」外掛,可以在文章中組織「前後對比」風格的作品集。Before/After 允許您從媒體庫中選擇具體的圖片,從文章編輯頁面中將它們分類為相應的「Before」和「After」群組。對那些在他們的網站上展示他們的工作或服務的人(如網站設計師、藝術家、水管工等),這很有用。

支援和示例

=使用方法=

將圖片添加到您的媒體庫中,這些圖片將在文章添加/編輯頁面中可用。
在文章添加/編輯頁面上,只需從媒體庫列將圖片拖到「Before」和「After」列中。
要刪除項目,請雙擊它。

=模板標籤=

=<?php $beforeafter->is_gallery( id ); ?>=

如果特定文章有 Before/After 相冊,則返回 true。

id:

文章 ID。通常為當前文章,$post->ID

=<?php $beforeafter->gallery( type , id , file , links , list , rel , limit ); ?>=

返回存儲在特定 Before/After 相冊中的圖像。

type:

決定要返回哪個相冊:Before 或 After。
值:「before」、「after」
預設值:「after」

id:

文章 ID。如果設置為 0,則會從所有具有 Before/After 相冊的文章中返回圖像。
預設值:0

file:

確定要返回的圖像類型:原始圖像文件或縮略圖。
值:「thumb」、「file」
預設值:「thumb」

links:

如果設置為 true,將使用連結將圖像包裝到原始文件中。
值:true、false
預設值:true

list:

如果設置為 true,將圖像包裝在
標籤中。
值:true、false
預設值:false

rel:

更改圖像連結的預設 rel 參數。
預設值:「beforeafter」

limit:

限制返回的項目數量。
預設值:全部

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Before/After」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Organize “before and after” style portfolios embedded within WordPress posts. Before/After allows you to select specific images out of your media library, and sort them into respective before and after groups from the post editing page. Useful for anyone who features their work or services (web-designers, artists, plumbers, etc.) on their site.
Support & Examples
=Use=

Add images to your Media Library; these images will become available to you on the post add/edit page.
On the post add/edit page, simply drag images from the Media Library column into the Before and After columns.
To remove an item, double-click it.

=Template Tags=
=is_gallery( id ); ?>=
Returns true if there is a Before/After gallery associated with a particular post.

id:

A post id. Typically the current post, $post->ID

=gallery( type , id , file , links , list , rel , limit ); ?>=
Returns the images stored in a particular Before/After gallery.

type:

Determines which gallery to return: before or after.
Values: ‘before’ , ‘after’
Default: ‘after’

id:

The post id. If set to 0, will return images from all posts with Before/After galleries.
Default: 0

file:

Determines the type of image to return: the original image file, or the thumbnail.
Values: ‘thumb’ , ‘file’
Default: ‘thumb’

links:

If set to true, will wrap images with links to the original files.
Values: true, false
Default: true

list:

If set to true, wraps the image in
tags.
Values: true, fase
Default: false

rel:

Alters the default rel parameter for image links.
Default: ‘beforeafter’

limit:

Limits how many items are returned.
Default: all of ’em.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon