For the complete documentation index, see llms.txt. This page is also available as Markdown.

acpt_get_field_options

Get the allowed options list for a Select / Radio / Checkbox field

Get the list of allowed options for a field that accepts a predefined set of values (Select, Select Multiple, Radio, Checkbox).

Usage

$options = acpt_get_field_options('my_box', 'status_field');

foreach ($options as $option) {
    echo $option['value'] . ' — ' . $option['label'];
}

Parameters

Parameter
Type
Required
Description

box_name

string

Required

The meta box name

field_name

string

Required

The field name

Return

Type
Description

array

An array of option entries, each with value and label keys. Returns an empty array if the field does not exist or has no options

Last updated