WPSEO_Bulk_List_Table::display_rows()publicYoast 1.0

Based on $this->items and the defined columns, the table rows will be displayed.

Метод класса: WPSEO_Bulk_List_Table{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WPSEO_Bulk_List_Table = new WPSEO_Bulk_List_Table();
$WPSEO_Bulk_List_Table->display_rows();

Код WPSEO_Bulk_List_Table::display_rows() Yoast 22.4

public function display_rows() {

	$records = $this->items;

	list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();

	if ( ( is_array( $records ) && $records !== [] ) && ( is_array( $columns ) && $columns !== [] ) ) {

		foreach ( $records as $record ) {

			echo '<tr id="', esc_attr( 'record_' . $record->ID ), '">';

			foreach ( $columns as $column_name => $column_display_name ) {

				$classes = '';
				if ( $primary === $column_name ) {
					$classes .= ' has-row-actions column-primary';
				}

				$attributes = $this->column_attributes( $column_name, $hidden, $classes, $column_display_name );

				$column_value = $this->parse_column( $column_name, $record );

				if ( method_exists( $this, 'parse_page_specific_column' ) && empty( $column_value ) ) {
					$column_value = $this->parse_page_specific_column( $column_name, $record, $attributes );
				}

				if ( ! empty( $column_value ) ) {
					printf( '<td %2$s>%1$s</td>', $column_value, $attributes );
				}
			}

			echo '</tr>';
		}
	}
}