Yoast\WP\SEO\AI\Content_Planner\Domain
Content_Suggestion_Parameters{}
Parameters for a content suggestion request.
Хуков нет.
Использование
$Content_Suggestion_Parameters = new Content_Suggestion_Parameters(); // use class methods
Методы
- public __construct( WP_User $user, string $language, array $content, string $editor )
- public get_content()
- public get_editor()
- public get_language()
- public get_user()
Код Content_Suggestion_Parameters{} Content Suggestion Parameters{} Yoast 28.7
class Content_Suggestion_Parameters {
/**
* The user the request is on behalf of.
*
* @var WP_User
*/
private $user;
/**
* The language code.
*
* @var string
*/
private $language;
/**
* The content payload: posts and optional about_page.
*
* @var array<string>
*/
private $content;
/**
* The editor identifier sent as the X-Yst-Cohort header.
*
* @var string
*/
private $editor;
/**
* The constructor.
*
* @param WP_User $user The user.
* @param string $language The language code.
* @param array<string> $content The content payload.
* @param string $editor The editor identifier.
*/
public function __construct( WP_User $user, string $language, array $content, string $editor ) {
$this->user = $user;
$this->language = $language;
$this->content = $content;
$this->editor = $editor;
}
/**
* Returns the user.
*
* @return WP_User The user.
*/
public function get_user(): WP_User {
return $this->user;
}
/**
* Returns the language code.
*
* @return string The language code.
*/
public function get_language(): string {
return $this->language;
}
/**
* Returns the content payload.
*
* @return array<string> The content payload.
*/
public function get_content(): array {
return $this->content;
}
/**
* Returns the editor identifier.
*
* @return string The editor identifier.
*/
public function get_editor(): string {
return $this->editor;
}
}