# wordpress-seo/28.0/src/ai/content-planner/domain/content-suggestion-list.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 28.0. 42 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/28.0/code/src/ai/content-planner/domain/content-suggestion-list.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/28.0/raw/src/ai/content-planner/domain/content-suggestion-list.php
- Modified: 2026-04-28T14:11:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/28.0/code/src/ai/content-planner/domain/content-suggestion-list.php#L10-L20`.

```php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\AI\Content_Planner\Domain;

/**
 * List of content suggestions.
 */
class Content_Suggestion_List {

	/**
	 * The suggestions.
	 *
	 * @var array<Content_Suggestion>
	 */
	private $content_suggestions = [];

	/**
	 * Adds a content suggestion to the list.
	 *
	 * @param Content_Suggestion $content_suggestion A content suggestion.
	 *
	 * @return void
	 */
	public function add( Content_Suggestion $content_suggestion ): void {
		$this->content_suggestions[] = $content_suggestion;
	}

	/**
	 * Returns this object in array format.
	 *
	 * @return array<array<string, string|bool|array<string, int>>> The suggestions as an array.
	 */
	public function to_array(): array {
		$result = [];
		foreach ( $this->content_suggestions as $suggestion ) {
			$result[] = $suggestion->to_array();
		}

		return [ 'suggestions' => $result ];
	}
}

```
