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 )

Creates a string of <option> HTML elements based on a provided WP_Term.

Parameters Parameters


(string) (Required) The saved number of columns.

Top ↑

Return Return

(string) HTML That creates <option> HTML elements

Top ↑

Source Source

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

	private function get_column_options_html( $selected_term ) {
		$html = '';
		foreach ( array( 3, 4, 5 ) as $columns ) {
			$html .= sprintf(
				'<option value="%1$d"%2$s>%3$d %4$s</option>',
				esc_attr( $columns ),
				selected( $selected_term === $columns, true, false ),
				esc_html( $columns ),
				esc_html__( 'columns', 'inventory-presser' )
		return $html;