ACF_Repeater_Table::row_handle()
Renders the row handle at the start of each row.
Метод класса: ACF_Repeater_Table{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ACF_Repeater_Table = new ACF_Repeater_Table(); $ACF_Repeater_Table->row_handle( $i );
- $i(int) (обязательный)
- The current row number.
Список изменений
С версии 6.0.0 | Введена. |
Код ACF_Repeater_Table::row_handle() ACF Repeater Table::row handle ACF 6.0.4
<?php public function row_handle( $i ) { if ( ! $this->show_order ) { return; } $hr_row_num = intval( $i ) + 1; $classes = 'acf-row-handle order'; $title = __( 'Drag to reorder', 'acf' ); $row_num_html = sprintf( '<span class="acf-row-number" title="%s">%d</span>', __( 'Click to reorder', 'acf' ), $hr_row_num ); if ( ! empty( $this->field['pagination'] ) ) { $classes .= ' pagination'; $title = ''; $input = sprintf( '<input type="number" class="acf-order-input" value="%d" style="display: none;" />', $hr_row_num ); $row_num_html = '<div class="acf-order-input-wrap">' . $input . $row_num_html . '</div>'; } ?> <td class="<?php echo $classes; ?>" title="<?php echo $title; ?>"> <?php if ( $this->field['collapsed'] ) : ?> <a class="acf-icon -collapse small" href="#" data-event="collapse-row" title="<?php _e( 'Click to toggle', 'acf' ); ?>"></a> <?php endif; ?> <?php echo $row_num_html; ?> </td> <?php }