Current File : /dom405686/wp-content/plugins/wordpress-seo/src/bulk-editor/domain/posts/post.php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Bulk_Editor\Domain\Posts;
/**
* This class describes a single content item shown in the bulk editor table.
*/
class Post {
/**
* The post ID.
*
* @var int
*/
private $id;
/**
* The post title.
*
* @var string
*/
private $title;
/**
* The post status.
*
* @var string
*/
private $status;
/**
* The URL to edit the post.
*
* @var string
*/
private $edit_link;
/**
* The focus keyphrase.
*
* @var string
*/
private $focus_keyphrase;
/**
* The raw stored SEO title (empty string when never explicitly saved).
*
* @var string
*/
private $seo_title;
/**
* The raw stored meta description (empty string when never explicitly saved).
*
* @var string
*/
private $meta_description;
/**
* The raw stored social title (empty string when never explicitly saved).
*
* @var string
*/
private $social_title;
/**
* The raw stored social description (empty string when never explicitly saved).
*
* @var string
*/
private $social_description;
/**
* Whether the current user may edit this post.
*
* @var bool
*/
private $editable;
/**
* The images shown for this post: a list of image data, empty when no add-on supplies any.
*
* @var array<int, array<string, int|string>>
*/
private $images;
/**
* Additional context data supplied by add-ons (e.g. product short description).
*
* @var array<string, string>
*/
private $context;
/**
* Whether each field needs improvement, keyed by field param (e.g. `seo_title`). Empty for a post whose
* fields are not editable.
*
* @var array<string, bool>
*/
private $needs_improvement;
/**
* The post type's SEO title template, shown when the stored value is empty. Empty string when the stored value is set.
*
* @var string
*/
private $seo_title_fallback;
/**
* The post type's meta description template, shown when the stored value is empty. Empty string when the stored value is set.
*
* @var string
*/
private $meta_description_fallback;
/**
* The post type's social title template, shown when the stored value is empty. Empty string when the stored value is set.
*
* @var string
*/
private $social_title_fallback;
/**
* The post type's social description template, shown when the stored value is empty. Empty string when the stored value is set.
*
* @var string
*/
private $social_description_fallback;
/**
* The constructor.
*
* @param int $id The post ID.
* @param string $title The post title.
* @param string $status The post status.
* @param string $edit_link The URL to edit the post.
* @param string $focus_keyphrase The focus keyphrase.
* @param string $seo_title The raw stored SEO title.
* @param string $meta_description The raw stored meta description.
* @param string $social_title The raw stored social title.
* @param string $social_description The raw stored social description.
* @param bool $editable Whether the current user may edit this post.
* @param array<string, bool> $needs_improvement Whether each field needs improvement, keyed by field param.
* @param string $seo_title_fallback The post type's SEO title template (empty when stored value is set).
* @param string $meta_description_fallback The post type's meta description template (empty when stored value is set).
* @param string $social_title_fallback The post type's social title template (empty when stored value is set).
* @param string $social_description_fallback The post type's social description template (empty when stored value is set).
* @param array<int, array<string, int|string>> $images The images shown for this post, as a list of image data.
* @param array<string, string> $context Additional context data supplied by add-ons.
*/
public function __construct(
int $id,
string $title,
string $status,
string $edit_link,
string $focus_keyphrase,
string $seo_title,
string $meta_description,
string $social_title,
string $social_description,
bool $editable,
array $needs_improvement = [],
string $seo_title_fallback = '',
string $meta_description_fallback = '',
string $social_title_fallback = '',
string $social_description_fallback = '',
array $images = [],
array $context = []
) {
$this->id = $id;
$this->title = $title;
$this->status = $status;
$this->edit_link = $edit_link;
$this->focus_keyphrase = $focus_keyphrase;
$this->seo_title = $seo_title;
$this->meta_description = $meta_description;
$this->social_title = $social_title;
$this->social_description = $social_description;
$this->editable = $editable;
$this->needs_improvement = $needs_improvement;
$this->seo_title_fallback = $seo_title_fallback;
$this->meta_description_fallback = $meta_description_fallback;
$this->social_title_fallback = $social_title_fallback;
$this->social_description_fallback = $social_description_fallback;
$this->images = $images;
$this->context = $context;
}
/**
* Parses the post to the expected key value representation.
*
* @return array<string, int|string|bool|array<string, bool|string>|array<int, array<string, int|string>>> The post presented as the expected key value representation.
*/
public function to_array(): array {
return [
'id' => $this->id,
'title' => $this->title,
'status' => $this->status,
'edit_link' => $this->edit_link,
'focus_keyphrase' => $this->focus_keyphrase,
'seo_title' => $this->seo_title,
'meta_description' => $this->meta_description,
'social_title' => $this->social_title,
'social_description' => $this->social_description,
'seo_title_fallback' => $this->seo_title_fallback,
'meta_description_fallback' => $this->meta_description_fallback,
'social_title_fallback' => $this->social_title_fallback,
'social_description_fallback' => $this->social_description_fallback,
'editable' => $this->editable,
'needs_improvement' => \array_merge(
[
'seo_title' => false,
'meta_description' => false,
'social_title' => false,
'social_description' => false,
],
$this->needs_improvement,
),
'images' => $this->images,
'context' => $this->context,
];
}
}
Distinguish Your Business From The Rest With The People That Make Up Your Team
We go Beyond a Resume to find high value, committed people
ready, willing, and able to add true value toward your organization's mission.
The right people make or break your business
We focus on resolving two types of challenges surrounding staffing and recruiting at Beyond a Resume: The first challenge comes when a business continues to grow, but does not have the full-time, internal, talent acquisition resources to hire the right people or talent necessary to keep up with their rate of progression as a company.
The second is a business that has a dedicated internal Human Resources Team, but requires outsourced assistance when the volume of people and talent needed exceeds short term internal capacity, OR the position(s) they seek to fill demand a specific skill set that is difficult to find, requiring added bandwidth.
In nearly any line of business, growth is a challenge in and of itself. Yet, the real problems arise in managing growth to ensure your progress remains profitable, sustainable, and repeatable. The biggest factor in this equation is usually found in your people. When you have the right people, success is unlimited. On the other hand, when you don’t have the right people in place or are having trouble finding enough of the right people, failure or stagnation is imminent.
The frustration that comes with the process of “hiring” can bring you to new levels of stress as the time cost involved eats away at your production elsewhere. If you have experienced this in the past, or are currently struggling with this issue, you’re certainly not alone. You may simply need the right partner to take the worst parts of this process off your plate so you can concentrate on your responsibilities, while we work diligently to reduce the noise and deliver only the ideal candidates worth your time and attention.
People can make or break your business and we go Beyond a Resume to find high value, committed people ready, willing, and able to add true value.