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

CMB Field Type: Sorter

描述

This plugin gives you two CMB field types based on the Sorter script:

Usage

`tb_sorter` – Select box with with typeahead-style search. Example:

    $cmb->add_field(array(
        'name'    => 'Page Layout',
        'id'      => $prefix . 'ingredients',
        'desc'    => 'Select Page Layout',
        'type'    => 'tb_sorter',
        'options' => array(
            'enabled'  => array(
                'highlights' => 'Highlights',
                'slider'     => 'Slider',
                'staticpage' => 'Static Page',              
            ),
            'disabled' => array(
                'services'   => 'Services'
            )        
        ),
    ));

Out put

    get_post_meta(get_the_ID(), '_yourprefix_about_ingredients', true);

IMPORTANT: The key pair of ‘placebo’ => ‘placebo’ IS NO LONGER REQUIRED.

螢幕截圖

  • admin panel
  • drag drop
  • output value

安裝

You can install this field type as you would a WordPress plugin:

  1. Download the plugin
  2. Place the plugin folder in your /wp-content/plugins/ directory
  3. Activate the plugin in the Plugin dashboard
  4. Alternatively, you can place the plugin folder in with your theme/plugin. After you call CMB:

Add another line to include the cmb-field-sorter.php file. Something like:
require_once ‘cmb-field-type-sorter/cmb-field-sorter.php’;

評價

閱讀全部2個評價

貢獻者及開發者

“CMB Field Type: Sorter” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 CMB Field Type: Sorter 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄