Title: LibWp
Author: Mostafa Soufi
Published: <strong>2012 年 7 月 19 日</strong>
Last modified: 2021 年 4 月 4 日

---

搜尋外掛

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

![](https://ps.w.org/libwp/assets/icon-256x256.png?rev=1043606)

# LibWp

 由 [Mostafa Soufi](https://profiles.wordpress.org/mostafas1990/) 開發

[下載](https://downloads.wordpress.org/plugin/libwp.2.2.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/libwp/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/libwp/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/libwp/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/libwp/#developers)

 [技術支援](https://wordpress.org/support/plugin/libwp/)

## 外掛說明

Provide some simple functionality to register some hooks that could not register
inside the WordPress themes

### Quick Start

Get instance of main class.

    ```
    LibWp();
    ```

**Post type**

    ```
    LibWp()->postType();
    ```

**Taxonomy**

    ```
    LibWp()->taxonomy();
    ```

### Register a new taxonomy

    ```
    LibWp()->postType()
        ->setName('book')
        ->setLabels([
            'name'          => _x('Books', 'Post type general name', 'textdomain'),
            'singular_name' => _x('Book', 'Post type singular name', 'textdomain'),
            'menu_name'     => _x('Books', 'Admin Menu text', 'textdomain'),
            'add_new'       => __('Add New', 'textdomain'),
            'edit_item'     => __('Edit Book', 'textdomain'),
            'view_item'     => __('View Book', 'textdomain'),
            'all_items'     => __('All Books', 'textdomain'),
        ])
        ->setFeatures([
            'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'
        ])
        ->setArgument('show_ui', true)
        ->register();
    ```

### Register a new taxonomy belongs to previous post type

    ```
    LibWp()->taxonomy()
        ->setName('types')
        ->setPostTypes('book')
        ->setArgument('show_in_rest', true)
        ->setLabels([
            'name'          => _x('Types', 'taxonomy general name', 'textdomain'),
            'singular_name' => _x('Type', 'taxonomy singular name', 'textdomain'),
            'search_items'  => __('Search Types', 'textdomain'),
            'all_items'     => __('All Types', 'textdomain'),
            'edit_item'     => __('Edit Type', 'textdomain'),
            'add_new_item'  => __('Add New Type', 'textdomain'),
            'new_item_name' => __('New Type Name', 'textdomain'),
            'menu_name'     => __('Types', 'textdomain'),
        ])
        ->register();
    ```

## 安裝方式

 1. Upload `libwp` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈LibWp〉的開發相關工作。

參與者

 *   [ Mostafa Soufi ](https://profiles.wordpress.org/mostafas1990/)
 *   [ Navid Kashani ](https://profiles.wordpress.org/kashani/)
 *   [ VeronaLabs ](https://profiles.wordpress.org/veronalabs/)

[將〈LibWp〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/libwp)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/libwp/)、查看 
[SVN 存放庫](https://plugins.svn.wordpress.org/libwp/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/libwp/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/libwp/)。

## 變更記錄

#### 2.2

 * Added support filters post type and taxonomy
 * Registered an example of post type & taxonomy after plugin initialization.

#### 2.1

 * Added support custom argument for register the taxonomy

#### 2.0

 * Changed the structure fo boilerplate

#### 1.0

 * Initial the plugin

## 中繼資料

 *  版本 **2.2**
 *  最後更新 **5 年前**
 *  啟用安裝數 **400+**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **5.6.17**
 *  PHP 版本需求 ** 7.1 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/libwp/)
 * 標籤:
 * [functionality](https://tw.wordpress.org/plugins/tags/functionality/)[library](https://tw.wordpress.org/plugins/tags/library/)
   [post type](https://tw.wordpress.org/plugins/tags/post-type/)[taxonomy](https://tw.wordpress.org/plugins/tags/taxonomy/)
   [theme](https://tw.wordpress.org/plugins/tags/theme/)
 *  [進階檢視](https://tw.wordpress.org/plugins/libwp/advanced/)

## 評分

 4 星，滿分為 5 星

 *  [  0 個 5 星使用者評論     ](https://wordpress.org/support/plugin/libwp/reviews/?filter=5)
 *  [  1 個 4 星使用者評論     ](https://wordpress.org/support/plugin/libwp/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/libwp/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/libwp/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/libwp/reviews/?filter=1)

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

[查看全部使用者評論](https://wordpress.org/support/plugin/libwp/reviews/)

## 參與者

 *   [ Mostafa Soufi ](https://profiles.wordpress.org/mostafas1990/)
 *   [ Navid Kashani ](https://profiles.wordpress.org/kashani/)
 *   [ VeronaLabs ](https://profiles.wordpress.org/veronalabs/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/libwp/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://wp-sms-pro.com/donate)