0 ? $max : '∞' ); $free = (int) $g['included_free'] > 0 ? ( (int) $g['included_free'] . ' (' . ( 'cheapest_free' === $g['free_policy'] ? esc_html__( 'cheapest', 'ai-eshop-optimizer' ) : esc_html__( 'priciest', 'ai-eshop-optimizer' ) ) . ')' ) : '—'; $type = ucfirst( (string) $g['select_type'] ); $aieo_og_types[ strtolower( $type ) ] = $type; $aieo_og_rows[] = array( 'name' => array( 'html' => '' . esc_html( $g['name'] ) . '' ), 'type' => array( 'label' => $type, 'tone' => 'mono' ), 'select' => $sel, 'free' => $free, 'options' => (int) $g['option_count'], 'products' => (int) $g['product_count'], 'actions' => '' . esc_html__( 'Edit', 'ai-eshop-optimizer' ) . ' · ' . esc_html__( 'Delete', 'ai-eshop-optimizer' ) . '', '_id' => (int) $g['id'], '_data' => array( 'data-id' => (int) $g['id'] ), '_f' => array( 'type' => array( strtolower( $type ) ) ), '_text' => (string) $g['name'] . ' ' . (int) $g['product_count'], '_s' => array( 'name' => (string) $g['name'], 'select' => $min * 1000 + ( $max > 0 ? $max : 999 ), 'free' => (int) $g['included_free'] ), ); } echo AIEO_Table::local( 'aieo-og-list', array( array( 'key' => 'name', 'label' => __( 'Name', 'ai-eshop-optimizer' ) ), array( 'key' => 'type', 'label' => __( 'Type', 'ai-eshop-optimizer' ), 'type' => 'status' ), array( 'key' => 'select', 'label' => __( 'Select', 'ai-eshop-optimizer' ), 'sort' => 'number' ), array( 'key' => 'free', 'label' => __( 'Free', 'ai-eshop-optimizer' ), 'sort' => 'number' ), array( 'key' => 'options', 'label' => __( 'Options', 'ai-eshop-optimizer' ), 'type' => 'num' ), array( 'key' => 'products', 'label' => __( 'Products', 'ai-eshop-optimizer' ), 'type' => 'num' ), array( 'key' => 'actions', 'label' => '', 'type' => 'actions' ), ), $aieo_og_rows, array( 'search' => array( 'label' => __( 'Search', 'ai-eshop-optimizer' ), 'placeholder' => __( 'Group name', 'ai-eshop-optimizer' ) ), 'filters' => array( array( 'key' => 'type', 'label' => __( 'Type', 'ai-eshop-optimizer' ), 'options' => $aieo_og_types, 'any' => __( 'Any type', 'ai-eshop-optimizer' ) ) ), 'prefix' => 'aieo-og-list_', 'sortable' => true, ) ); } ?>

—