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

Boone's Sortable Columns

外掛說明

Here’s how I recommend using the class.

  1. Either activate this plugin, or include the class in your own plugin file.
  2. When you start to render the page with the post list, define some columns and then instantiate the class:
    $cols = array(
    array(
    ‘name’ => ‘restaurant_name’,
    ‘title’ => ‘Restaurant Name’,
    ‘css_class’ => ‘restaurant-name’,
    ‘is_default’ => true
    ),
    array(
    ‘name’ => ‘cuisine_type’,
    ‘title’ => ‘Cuisine Type’,
    ‘css_class’ => ‘cuisine-type’,
    ‘default_order’ => ‘desc’
    )
    );
    $sortable = new BBG_CPT_Sort( $cols );
  3. As you render your table, you can use all sorts of fun methods to create column headers. Example:

have_columns() ) : ?>
have_columns() ) : $sortable->the_column() ?>
<th class="the_column_css_class() ?>”>
<a href="the_column_next_link( ‘url’ ) ?>”>the_column_title() ?>

安裝方式

Two choices:
1. Install from the plugins repository and activate for use in your theme
or
2. Copy the BBG_CPT_Sort class into your own plugin/theme and require it manually.

使用者評論

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

參與者及開發者

以下人員參與了開源軟體〈Boone's Sortable Columns〉的開發相關工作。

參與者

將〈Boone's Sortable Columns〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

1.1

  • Adds setup_base_url() method, for greater control over how column header URLs are generated

1.0

  • Initial release