[wordpress插件] Boone's Sortable Columns布恩的可排序列

wordpress 插件 文章 2020-03-09 07:20 488 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Here’s how I recommend using the class.

这是我推荐使用该课程的方式。

    1. Either activate this plugin, or include the class in your own plugin file.
    2. 要么激活此插件,要么将类包含在您自己的插件文件中。

    3. When you start to render the page with the post list, define some columns and then instantiate the class:

    4. 当您开始用帖子列表呈现页面时,请定义一些列,然后实例化该类:

      $cols = array(
          

      $ cols = array(
          

      array(
              

      数组(
              

      ‘name’ => ‘restaurant_name’,
              

      ‘name’=>‘restaurant_name’,
              

      ‘title’ => ‘Restaurant Name’,
              

      ‘title’=>‘Restaurant Name’,
              

      ‘css_class’ => ‘restaurant-name’,
              

      ‘css_class’=>‘餐厅名称’,
              

      ‘is_default’ => true
          

      ‘is_default’=> true
          

      ),
          

      ),
          

      array(
              

      数组(
              

      ‘name’ => ‘cuisine_type’,
              

      ‘name’=>‘cuisine_type’,
              

      ‘title’ => ‘Cuisine Type’,
              

      ‘title’=>‘烹饪类型’,
              

      ‘css_class’ => ‘cuisine-type’,
              

      ‘css_class’=>‘美食类型’,
              

      ‘default_order’ => ‘desc’
          

      ‘default_order’=>‘desc’
          

      )


      );

      );

      $sortable = new BBG_CPT_Sort( $cols );

    5. $ sortable = new BBG_CPT_Sort($ cols);

    6. As you render your table, you can use all sorts of fun methods to create column headers.

    7. 呈现表时,可以使用各种有趣的方法来创建列标题。

      Example:

    8. 示例:

    have_columns() ) : ?>
                

    have_columns()):?>
                

    have_columns() ) : $sortable->the_column() ?>
                    

    have_columns()):$ sortable-> the_column()?>
                    

    ”>the_column_title() ?>

    安装步骤

下载地址
https://downloads.wordpress.org/plugin/boones-sortable-columns.1.1.zip
-EOF-

AI助手支持GPT4.0