Описание
Here’s how I recommend using the class.
- Either activate this plugin, or include the class in your own plugin file.
- 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 ); - 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.
Отзиви
There are no reviews for this plugin.
Сътрудници и разработчици
“Boone's Sortable Columns” е софтуер с отворен код. Към разширението са допринесли следните хора:
СътруднициПревеждане на “Boone's Sortable Columns” на вашия език.
Имате интерес към разработване?
Преглеждане на кода, разглеждане на SVN хранилище, или абонамент към програмната история (log) чрез RSS.
Списък с промени
1.1
- Adds setup_base_url() method, for greater control over how column header URLs are generated
1.0
- Initial release