Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Inventory_Presser_Grid::get_column_options_html( string $selected_term )

get_column_options_html


Parameters Parameters

$selected_term

(string) (Required) The saved number of columns


Top ↑

Return Return

(string) HTML That creates <option> HTML elements


Top ↑

Source Source

File: includes/class-widget-inventory-grid.php

	private function get_column_options_html($selected_term) {
 		$html = '';
 		foreach( [ 3, 4, 5 ] as $columns ) {
 			$html .= sprintf(
 				'<option value="%1$d"%2$s>%1$d columns</option>',
 				$columns,
 				selected( $selected_term == $columns, true, false )
 			);
 		}
 		return $html;
 	}