Current File : /dom405686/wp-content/plugins/wordpress-seo/src/abilities/user-interface/seo-data-output-schema.php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Abilities\User_Interface;
/**
* Builds the output schemas describing the SEO data of a single entity, such as a term.
*
* The SEO fields every entity type shares are described once; each entity type adds its
* identity fields and the fields whose meaning depends on the entity type.
*/
class SEO_Data_Output_Schema {
// phpcs:disable SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint -- The JSON schema arrays are heterogeneous by nature.
/**
* Returns the output schema describing a term's SEO data.
*
* @return array<string, mixed> The output schema.
*/
public function get_term_output_schema(): array {
$nullable_string = [
'type' => [ 'string', 'null' ],
];
return [
'type' => 'object',
'properties' => \array_merge(
[
'term_id' => [ 'type' => 'integer' ],
'term_name' => ( $nullable_string + [
'description' => \__( 'The breadcrumb title of the term when a custom one is set, otherwise the term name.', 'wordpress-seo' ),
] ),
'permalink' => $nullable_string,
'taxonomy' => [ 'type' => 'string' ],
],
$this->get_shared_properties(),
[
'canonical' => [
'type' => [ 'string', 'null' ],
'description' => \__( 'The custom canonical URL as stored for the term. Null when no custom value is set; the rendered companion field carries what is actually output.', 'wordpress-seo' ),
],
'canonical_rendered' => [
'type' => [ 'string', 'null' ],
'description' => \__( 'The canonical URL as output on the front end: the custom value when set, otherwise the permalink of the term. Null when nothing is output.', 'wordpress-seo' ),
],
'noindex' => [
'type' => [ 'boolean', 'null' ],
'description' => \__( 'Whether search engines are told not to index this term archive. true means noindex (the archive is excluded from search results); false means the archive is forced to be indexed; null means no setting is stored and the taxonomy default applies. The rendered companion field carries whether the archive is actually noindexed.', 'wordpress-seo' ),
],
'noindex_rendered' => [
'type' => [ 'boolean', 'null' ],
'description' => \__( 'Whether search engines are actually told not to index this term archive, as output on the front end.', 'wordpress-seo' ),
],
],
),
];
}
/**
* Returns the output schema describing the SEO data of an author archive.
*
* @return array<string, mixed> The output schema.
*/
public function get_author_output_schema(): array {
$nullable_string = [
'type' => [ 'string', 'null' ],
];
return [
'type' => 'object',
'properties' => [
'user_id' => [ 'type' => 'integer' ],
'user_name' => $nullable_string,
'permalink' => $nullable_string,
'seo_title' => $this->raw( \__( 'SEO title', 'wordpress-seo' ) ),
'seo_title_rendered' => $this->rendered( \__( 'SEO title', 'wordpress-seo' ) ),
'meta_description' => $this->raw( \__( 'meta description', 'wordpress-seo' ) ),
'meta_description_rendered' => $this->rendered( \__( 'meta description', 'wordpress-seo' ) ),
'noindex' => [
'type' => 'boolean',
'description' => \__( 'Whether search engines are told not to index this author archive. true means noindex (the archive is excluded from search results). When the site settings set all author archives to noindex, that setting applies regardless of this one. The rendered companion field carries whether the archive is actually noindexed.', 'wordpress-seo' ),
],
'noindex_rendered' => [
'type' => [ 'boolean', 'null' ],
'description' => \__( 'Whether search engines are actually told not to index this author archive, as output on the front end.', 'wordpress-seo' ),
],
],
];
}
/**
* Returns the properties of the SEO fields every entity type shares.
*
* The descriptions don't name the entity type, as a noun inserted into a translatable
* sentence can't be translated correctly.
*
* @return array<string, mixed> The shared properties, keyed by output-schema property name.
*/
private function get_shared_properties(): array {
return [
'seo_title' => $this->raw( \__( 'SEO title', 'wordpress-seo' ) ),
'seo_title_rendered' => $this->rendered( \__( 'SEO title', 'wordpress-seo' ) ),
'meta_description' => $this->raw( \__( 'meta description', 'wordpress-seo' ) ),
'meta_description_rendered' => $this->rendered( \__( 'meta description', 'wordpress-seo' ) ),
'focus_keyphrase' => [ 'type' => [ 'string', 'null' ] ],
'is_cornerstone' => [ 'type' => 'boolean' ],
'open_graph_title' => $this->raw( \__( 'Open Graph title', 'wordpress-seo' ) ),
'open_graph_title_rendered' => $this->rendered( \__( 'Open Graph title', 'wordpress-seo' ) ),
'open_graph_description' => $this->raw( \__( 'Open Graph description', 'wordpress-seo' ) ),
'open_graph_description_rendered' => $this->rendered( \__( 'Open Graph description', 'wordpress-seo' ) ),
'twitter_title' => $this->raw( \__( 'X title', 'wordpress-seo' ) ),
'twitter_title_rendered' => $this->rendered( \__( 'X title', 'wordpress-seo' ) ),
'twitter_description' => $this->raw( \__( 'X description', 'wordpress-seo' ) ),
'twitter_description_rendered' => $this->rendered( \__( 'X description', 'wordpress-seo' ) ),
'seo_score' => $this->score( \__( 'SEO analysis', 'wordpress-seo' ) ),
'readability_score' => $this->score( \__( 'readability analysis', 'wordpress-seo' ) ),
'inclusive_language_score' => $this->score( \__( 'inclusive language analysis', 'wordpress-seo' ) ),
];
}
/**
* Returns the property of a stored field.
*
* Null means "no custom value set", not "nothing is output".
*
* @param string $field The human-readable field name.
*
* @return array<string, mixed> The property.
*/
private function raw( string $field ): array {
return [
'type' => [ 'string', 'null' ],
'description' => \sprintf(
/* translators: %s expands to the name of the SEO field, e.g. "SEO title". */
\__( 'The custom %s as stored, which may contain unexpanded snippet variables. Null when no custom value is set; the rendered companion field carries what is actually output.', 'wordpress-seo' ),
$field,
),
];
}
/**
* Returns the property of the rendered companion of a stored field.
*
* @param string $field The human-readable field name.
*
* @return array<string, mixed> The property.
*/
private function rendered( string $field ): array {
return [
'type' => [ 'string', 'null' ],
'description' => \sprintf(
/* translators: %s expands to the name of the SEO field, e.g. "SEO title". */
\__( 'The %s as output on the front end: the global default template applied when no custom value is set, with snippet variables expanded. Null when nothing is output.', 'wordpress-seo' ),
$field,
),
];
}
/**
* Returns the property of an analysis score.
*
* @param string $analysis The human-readable analysis name.
*
* @return array<string, mixed> The property.
*/
private function score( string $analysis ): array {
return [
'type' => 'string',
'enum' => [ 'na', 'bad', 'ok', 'good' ],
'description' => \sprintf(
/* translators: %s expands to the name of the analysis, e.g. "SEO analysis". */
\__( 'The result of the %s as calculated at the last save in the editor.', 'wordpress-seo' ),
$analysis,
),
];
}
// phpcs:enable SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint
}
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.