[PHP] WordPress后台edit-tags.php里无限栏目分类实现 →→→→→进入此内容的聊天室

来自 , 2020-06-19, 写在 PHP, 查看 101 次.
URL http://www.code666.cn/view/46647365
  1. /**
  2.  * Generate the table rows
  3.  *
  4.  * @since 3.1.0
  5.  * @access protected
  6.  */
  7. function display_rows() {
  8.         foreach ( $this->items as $item )
  9.                 $this->single_row( $item );
  10. }
  11.  
  12. /**
  13.  * Generates content for a single row of the table
  14.  *
  15.  * @since 3.1.0
  16.  * @access protected
  17.  *
  18.  * @param object $item The current item
  19.  */
  20. function single_row( $item ) {
  21.         static $row_class = '';
  22.         $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
  23.  
  24.         echo '<tr' . $row_class . '>';
  25.         $this->single_row_columns( $item );
  26.         echo '</tr>';
  27. }
  28.  
  29. /**
  30.  * Generates the columns for a single row of the table
  31.  *
  32.  * @since 3.1.0
  33.  * @access protected
  34.  *
  35.  * @param object $item The current item
  36.  */
  37. function single_row_columns( $item ) {
  38.         list( $columns, $hidden ) = $this->get_column_info();
  39.  
  40.         foreach ( $columns as $column_name => $column_display_name ) {
  41.                 $class = "class='$column_name column-$column_name'";
  42.  
  43.                 $style = '';
  44.                 if ( in_array( $column_name, $hidden ) )
  45.                         $style = ' style="display:none;"';
  46.  
  47.                 $attributes = "$class$style";
  48.  
  49.                 if ( 'cb' == $column_name ) {
  50.                         echo '<th scope="row" class="check-column">';
  51.                         echo $this->column_cb( $item );
  52.                         echo '</th>';
  53.                 }
  54.                 elseif ( method_exists( $this, 'column_' . $column_name ) ) {
  55.                         echo "<td $attributes>";
  56.                         echo call_user_func( array( &$this, 'column_' . $column_name ), $item );
  57.                         echo "</td>";
  58.                 }
  59.                 else {
  60.                         echo "<td $attributes>";
  61.                         echo $this->column_default( $item, $column_name );
  62.                         echo "</td>";
  63.                 }
  64.         }
  65. }
  66.  

回复 "WordPress后台edit-tags.php里无限栏目分类实现"

这儿你可以回复上面这条便签

captcha