ACF_Repeater_Table::rows()
Renders or returns rows for the repeater field table.
Метод класса: ACF_Repeater_Table{}
Хуков нет.
Возвращает
Массив|null
.
Использование
$ACF_Repeater_Table = new ACF_Repeater_Table(); $ACF_Repeater_Table->rows( $return );
- $return(true|false)
- If we should return the rows or render them.
По умолчанию: false
Список изменений
С версии 6.0.0 | Введена. |
Код ACF_Repeater_Table::rows() ACF Repeater Table::rows ACF 6.0.4
public function rows( $return = false ) { $rows = array(); // Don't include the clone when rendering via AJAX. if ( $return && isset( $this->value['acfcloneindex'] ) ) { unset( $this->value['acfcloneindex'] ); } foreach ( $this->value as $i => $row ) { $rows[ $i ] = $this->row( $i, $row, $return ); } if ( $return ) { return $rows; } echo implode( PHP_EOL, $rows ); }