Title: Before/After
Author: keighl
Published: <strong>2009 年 12 月 1 日</strong>
Last modified: 2010 年 1 月 7 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/beforeafter.svg)

# Before/After

 作者：[keighl](https://profiles.wordpress.org/keighl/)

[下载](https://downloads.wordpress.org/plugin/beforeafter.zip)

 * [详情](https://cn.wordpress.org/plugins/beforeafter/#description)
 * [评价](https://cn.wordpress.org/plugins/beforeafter/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/beforeafter/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/beforeafter/#developers)

 [支持](https://wordpress.org/support/plugin/beforeafter/)

## 描述

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](http://www.keighl.com/plugins/before-after/)**

=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=

=`<?php $beforeafter->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

=`<?php $beforeafter->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.

## 屏幕截图

 * [[
 * A view from the post add/edit interface.

## 安装

 1. Upload `beforeafter.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Place template tags in theme files.

## 常见问题

  Can you upload photos directly from the post edit page?

No. Upload them to the media library directly; it works better.

  Can an image be in more than one gallery?

As of right now, no. If folks feel the need to do this, I can implement that feature.
Please note that the images are still available to do any other WordPress stuff (
eg. insert into post content), but may only used once within Before/After.

I’ve set it up this way to avoid confusing multiple images in the admin interface.

  How is Before/After styled?

It is not styled in any way. The plugin gives you an admin interface, and the template
tags to build any kind of gallery you want. Style it with CSS, or use it in conjunction
with a javascript library like jQuery.

To use this plugin you must be familiar with theme files and rudimentary PHP.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Before/After」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ keighl ](https://profiles.wordpress.org/keighl/)

[帮助将「Before/After」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/beforeafter)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/beforeafter/)，查看[SVN仓库](https://plugins.svn.wordpress.org/beforeafter/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/beforeafter/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/beforeafter/)。

## 更新日志

=0.2=
 * Adds a ‘limit’ argument to gallery()

#### 0.1

 * Initial release.

## 额外信息

 *  版本 **0.2**
 *  最后更新：**16 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 2.5 或更高版本 **
 *  已测试的最高版本为 **2.9.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/beforeafter/)
 * 标签
 * [before after](https://cn.wordpress.org/plugins/tags/before-after/)[cms](https://cn.wordpress.org/plugins/tags/cms/)
   [image gallery](https://cn.wordpress.org/plugins/tags/image-gallery/)[media library](https://cn.wordpress.org/plugins/tags/media-library/)
   [portfolio](https://cn.wordpress.org/plugins/tags/portfolio/)
 *  [高级视图](https://cn.wordpress.org/plugins/beforeafter/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/beforeafter/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/beforeafter/reviews/)

## 贡献者

 *   [ keighl ](https://profiles.wordpress.org/keighl/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/beforeafter/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.keighl.com/plugins/before-after/)