properties['choices'] = array(); } /** * Add a choice to the properties * * @param string $value Value op the option. * @param string $label Label to display for the value. * @param string $screen_reader_text Optional. Screenreader text to use. */ public function add_choice( $value, $label, $screen_reader_text = '' ) { $choice = array( 'label' => $label, ); if ( $screen_reader_text ) { $choice['screenReaderText'] = $screen_reader_text; } $this->properties['choices'][ $value ] = $choice; } }