Title: One-liners
Author: Brent Maxwell
Published: <strong>2015 年 3 月 17 日</strong>
Last modified: 2015 年 3 月 20 日

---

搜索插件

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

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

# One-liners

 作者：[Brent Maxwell](https://profiles.wordpress.org/thebrent/)

[下载](https://downloads.wordpress.org/plugin/one-liners.3.1.0.zip)

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

 [支持](https://wordpress.org/support/plugin/one-liners/)

## 描述

A custom post type, shortcode, and widget to display random one-line quips on your
site. Can be used for random quotes, jokes, etc.

### Use and Options

#### Options

Options are accessible under the ‘Oneliners’ menu. The only option is the slug for
the post type.

#### Widget

The widget has only two options: “Title” and “Display as permalink”.

#### Shortcode

    ```
    random-oneliner
    ```

The shortcode can take any parameters that the [`WP_Query()`](https://codex.wordpress.org/Class_Reference/WP_Query#Parameters)
object can take, with the exception of `post_type`. The defaults are: `posts_per_page
="1" orderby="rand"`

In addition, the `display_as_link` parameter can be set to `true` to output the 
oneliner with it’s permalink.

## 安装

 1. Upload the contents of the zip file to the `/wp-content/plugins/` directory or 
    use the WordPress plugin uploader.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## 常见问题

  What is the format and parameters for the shortcode?

random-oneliner

The shortcode can take any parameters that the [`WP_Query()`](https://codex.wordpress.org/Class_Reference/WP_Query#Parameters)
object can take, with the exception of `post_type`. The defaults are: `posts_per_page
="1" orderby="rand"`

In addition, the `display_as_link` parameter can be set to `true` to output the 
oneliner with it’s permalink.

## 评价

此插件暂无评价。

## 贡献者及开发者

「One-liners」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Brent Maxwell ](https://profiles.wordpress.org/thebrent/)

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

### 对开发感兴趣吗?

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

## 更新日志

#### 3.1.0

 * Added options for custom slug

#### 3.0.0

 * Total and complete update
 * Renamed to One Liners
 * Restructured the base class
 * Created a dedicated widget class
 * Activation/deactivation hook
 * Options for displaying quote as link

#### 2.0.0

 * Updated names and post type cause it was more clear

#### 1.1.1

 * security update on shortcode

#### 1.1.0

 * added initialization hook: thebrent_oneliners_init;
 * added three filter hooks: thebrent_oneliners_random_quote_args, thebrent_oneliners_random_quote,
   thebrent_oneliners_show;
 * added the ability to parametarize the shortcode

#### 1.0.0

 * moved everything into a class; added internationalization capability

#### 0.4.0

 * added widget

#### 0.3.0

 * added shortcode

#### 0.2.2

 * added post type icon

#### 0.2.1

 * added menu icons

#### 0.2.0

 * not sure why it went to 1.1, but it did

#### 0.1.0

 * First stable working version

## 额外信息

 *  版本 **3.1.0**
 *  最后更新：**11 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.0.1 或更高版本 **
 *  已测试的最高版本为 **4.11**
 *  语言
 * [English (US)](https://wordpress.org/plugins/one-liners/)
 * 标签
 * [one-liners](https://cn.wordpress.org/plugins/tags/one-liners/)[quotes](https://cn.wordpress.org/plugins/tags/quotes/)
   [shortcodes](https://cn.wordpress.org/plugins/tags/shortcodes/)[widgets](https://cn.wordpress.org/plugins/tags/widgets/)
 *  [高级视图](https://cn.wordpress.org/plugins/one-liners/advanced/)

## 评级

尚未提交反馈。

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

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

## 贡献者

 *   [ Brent Maxwell ](https://profiles.wordpress.org/thebrent/)

## 支持

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

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