properties['suggestions'] = array(); } /** * Adds a suggestion to the properties * * @param string $title The title of the choice. * @param string $copy The text explaining the choice. * @param array $button The button details. * @param array $video URL and title of the video accompanying the choice. */ public function add_suggestion( $title, $copy, $button, array $video = array() ) { $suggestion = array( 'title' => $title, 'copy' => $copy, 'button' => $button, ); if ( ! empty( $video ) ) { $suggestion['video'] = $video; } $this->properties['suggestions'][] = $suggestion; } }