first commit

This commit is contained in:
Rachit Bhargava
2023-07-21 17:12:10 -04:00
parent d0fe47dde4
commit 5d0f0734d8
14003 changed files with 2829464 additions and 0 deletions

View File

@@ -0,0 +1,292 @@
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
// phpcs:disable Yoast.NamingConventions.NamespaceName.Invalid
namespace Yoast\WP\SEO\Schema_Templates\Assets;
/**
* Class Icons.
*
* Provides SVG icons as strings.
*/
class Icons {
/**
* Represents the start of the SVG tag.
*/
const SVG_START_TAG = "<svg xmlns='http://www.w3.org/2000/svg' fill='none' style='fill:none' viewBox='0 0 24 24' stroke='currentColor' height='%SIZE%' width='%SIZE%' >";
/**
* The default height and width of an icon.
*/
const SIZE_DEFAULT = 24;
/**
* The height and width of an icon in a variation picker.
*/
const SIZE_VARIATION = 36;
/**
* The Heroicons academic cap svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_academic_cap( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path fill='#fff' d='M12 14l9-5-9-5-9 5 9 5z' />"
. "<path fill='#fff' d='M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z' />"
. "<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 14l9-5-9-5-9 5 9 5zm0 0l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14zm-4 6v-7.5l4-2.222' />",
$size
);
}
/**
* The Heroicons annotation svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_annotation( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z' />",
$size
);
}
/**
* The Heroicons ban svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_ban( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636' />",
$size
);
}
/**
* The Heroicons briefcase svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_briefcase( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z' />",
$size
);
}
/**
* The Heroicons calendar svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_calendar( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z' />",
$size
);
}
/**
* The Heroicons clipboard check svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_clipboard_check( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4' />",
$size
);
}
/**
* The Heroicons clipboard copy svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_clipboard_copy( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3' />",
$size
);
}
/**
* The Heroicons clipboard list svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_clipboard_list( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01' />",
$size
);
}
/**
* The Heroicons clock svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_clock( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z' />",
$size
);
}
/**
* The Heroicons currency dollar svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_currency_dollar( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z' />",
$size
);
}
/**
* The Heroicons cursor_click svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_cursor_click( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122' />",
$size
);
}
/**
* The Heroicons document text svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_document_text( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z' />",
$size
);
}
/**
* The Heroicons globe svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_globe( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z' />",
$size
);
}
/**
* The Heroicons identification svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_identification( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 6H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V8a2 2 0 00-2-2h-5m-4 0V5a2 2 0 114 0v1m-4 0a2 2 0 104 0m-5 8a2 2 0 100-4 2 2 0 000 4zm0 0c1.306 0 2.417.835 2.83 2M9 14a3.001 3.001 0 00-2.83 2M15 11h3m-3 4h2' />",
$size
);
}
/**
* The Heroicons location marker svg icon
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_location_marker( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z' />"
. "<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 11a3 3 0 11-6 0 3 3 0 016 0z' />",
$size
);
}
/**
* The Heroicons office building svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_office_building( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path d='M19 21V5C19 3.89543 18.1046 3 17 3H7C5.89543 3 5 3.89543 5 5V21M19 21L21 21M19 21H14M5 21L3 21M5 21H10M9 6.99998H10M9 11H10M14 6.99998H15M14 11H15M10 21V16C10 15.4477 10.4477 15 11 15H13C13.5523 15 14 15.4477 14 16V21M10 21H14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/>",
$size
);
}
/**
* The Heroicons photograph svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_photograph( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z' />",
$size
);
}
/**
* The Heroicons switch horizontal svg icon.
*
* @param int $size The Height and Width of the SVG icon.
* @return string
*/
public static function heroicons_switch_horizontal( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4' />",
$size
);
}
/**
* The Heroicons grid svg icon.
*
* @param int $size The Height and Width of the SVG icon.
*
* @return string The generated icon.
*/
public static function heroicons_grid( $size = self::SIZE_DEFAULT ) {
return self::svg(
"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z' />",
$size
);
}
/**
* Generates the SVG based on given path.
*
* @param string $path The path to generate svg for.
* @param int $svg_size The Height and Width of the SVG icon.
*
* @return string The generated icon svg.
*/
protected static function svg( $path, $svg_size = self::SIZE_DEFAULT ) {
$start = \str_replace( '%SIZE%', $svg_size, self::SVG_START_TAG );
return $start . $path . '</svg>';
}
}

View File

@@ -0,0 +1,11 @@
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.Invalid
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
namespace Yoast\WP\SEO\Schema_Templates\Block_Patterns;
/**
* Holds the names of the block pattern categories.
*/
class Block_Pattern_Categories {
const YOAST_JOB_POSTING = 'yoast_job_posting';
}

View File

@@ -0,0 +1,11 @@
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.Invalid
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
namespace Yoast\WP\SEO\Schema_Templates\Block_Patterns;
/**
* Holds the names of the block pattern keywords.
*/
class Block_Pattern_Keywords {
const YOAST_JOB_POSTING = [ 'yoast', 'job', 'posting', 'vacancy' ];
}

View File

@@ -0,0 +1,59 @@
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.Invalid
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
namespace Yoast\WP\SEO\Schema_Templates\Block_Patterns;
/**
* A Gutenberg block pattern.
*/
abstract class Block_Pattern {
/**
* Returns the block pattern configuration.
*
* @return string[] The configuration.
*/
public function get_configuration() {
return [
'title' => $this->get_title(),
'content' => $this->get_content(),
'categories' => (array) $this->get_categories(),
'keywords' => (array) $this->get_keywords(),
];
}
/**
* Gets the name of this block pattern.
*
* @return string The name of this block pattern.
*/
abstract public function get_name();
/**
* Gets the title of this block pattern.
*
* @return string The title of this block pattern.
*/
abstract public function get_title();
/**
* Gets the contents of this block pattern.
*
* @return string The contents of this block pattern.
*/
abstract public function get_content();
/**
* Gets the categories of this block pattern.
*
* @return string[] The categories of this block pattern.
*/
abstract public function get_categories();
/**
* Gets the keywords of this block pattern.
*
* @return string[] The keywords of this block pattern.
*/
abstract public function get_keywords();
}

View File

@@ -0,0 +1,29 @@
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.Invalid
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
// phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
namespace Yoast\WP\SEO\Schema_Templates\Block_Patterns;
/**
* A minimal job posting, containing required blocks only.
*/
abstract class Job_Posting_Base_Pattern extends Block_Pattern {
/**
* Includes this Job Posting block pattern in the Yoast Job Posting block pattern category.
*
* @return array The categories under which this block pattern should be shown.
*/
public function get_categories() {
return [ Block_Pattern_Categories::YOAST_JOB_POSTING ];
}
/**
* Gets the keywords of this block pattern.
*
* @return array The keywords that help users discover the pattern while searching.
*/
public function get_keywords() {
return [ Block_Pattern_Keywords::YOAST_JOB_POSTING ];
}
}

View File

@@ -0,0 +1,117 @@
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.Invalid
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
namespace Yoast\WP\SEO\Schema_Templates\Block_Patterns;
/**
* A default job posting, containing all the required and recommended blocks.
*/
class Job_Posting_Default extends Job_Posting_Base_Pattern {
/**
* Gets the name of this block pattern.
*
* @return string The name of this block pattern.
*/
public function get_name() {
return 'yoast/job-posting/default';
}
/**
* Gets the title of this block pattern.
*
* @return string The title of this block pattern.
*/
public function get_title() {
return 'Job Posting (default)';
}
/**
* Gets the contents of this block pattern.
*
* @return string The contents of this block pattern.
*/
public function get_content() {
return '<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:yoast/job-employment-type {"employmentType":"FULL_TIME"} -->
<div class="yoast-inner-container"><h3 data-id="title">Employment</h3><span data-id="employmentType" data-value="FULL_TIME">Full time</span></div>
<!-- /wp:yoast/job-employment-type --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:yoast/job-salary -->
<div class="yoast-inner-container"><!-- wp:yoast/job-salary-range {"currency":"USD","minValue":"1000","maxValue":"2000","unit":"MONTH"} -->
<div class="yoast-inner-container"><h3 data-id="title">Salary range</h3><div class="yoast-schema-flex"><span data-id="currency" data-value="USD">USD</span> 1000 - 2000 / <span data-id="unit" data-value="MONTH">month</span></div></div>
<!-- /wp:yoast/job-salary-range --></div>
<!-- /wp:yoast/job-salary --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:yoast/job-location -->
<div class="yoast-inner-container"><!-- wp:yoast/remote-location -->
<div class="yoast-inner-container"><h3 data-id="Location">Location</h3><p data-id="remote-location">This job is 100% remote.</p></div>
<!-- /wp:yoast/remote-location --></div>
<!-- /wp:yoast/job-location --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- wp:separator {"align":"wide"} -->
<hr class="wp-block-separator alignwide"/>
<!-- /wp:separator -->
<!-- wp:paragraph {"style":{"typography":{"fontSize":24}}} -->
<p style="font-size:24px">Were looking for a software architect or senior developer with a passion for software architecture to join our rapidly expanding business. Come help us make our development team even better!</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 id="h-about-the-job">About the job</h2>
<!-- /wp:heading -->
<!-- wp:yoast/job-description -->
<div class="yoast-inner-container"><p data-id="description">Technical leadership will be key in your role as a software architect. Our software architects solve big picture problems. You will be challenged by complex issues that require your smartly designed programs and systems to be tackled. So, software development is part of the job but will not be your primary task.</p></div>
<!-- /wp:yoast/job-description -->
<!-- wp:heading -->
<h2 id="h-about-you">About you</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Preferably you have some experience with (some of) the technology we use, like WordPress, PHP and (modern) JavaScript. You are familiar with design patterns and coding principles like SOLID and TDD and are able to explain and think in different programming paradigms (like functional vs OOP).</p>
<!-- /wp:paragraph -->
<!-- wp:yoast/job-requirements {"title_level":2} -->
<div class="yoast-inner-container"><h2 data-id="title">Requirements</h2><ul data-id="requirements"><li>Multiple years of software development experience.</li><li>The ability to clearly explain things to your colleagues.</li><li>The ability to learn fast.</li><li>Quickly familiarize yourself with new codebases and frameworks.</li></ul></div>
<!-- /wp:yoast/job-requirements -->
<!-- wp:yoast/job-benefits {"title_level":2} -->
<div class="yoast-inner-container"><h2 data-id="title">Benefits</h2><ul data-id="benefits"><li>A challenging job in a fast-growing, dynamic, ambitious and international atmosphere. Working at a company that impacts the web.</li><li>We have a great pension plan, which is fully paid by Yoast.</li><li>Exercise and stay fit! We have our own gym and a personal trainer!</li><li>The opportunity to learn a lot in a short time, at one of the leading SEO companies.</li></ul></div>
<!-- /wp:yoast/job-benefits -->
<!-- wp:paragraph -->
<p>Are you interested?<strong>&nbsp;Then respond before May 19, 2021.</strong>&nbsp;The application procedure consists of three interviews. Do you have questions? We\'ll be happy to answer them. Please send an email to jobs@yoast.com.</p>
<!-- /wp:paragraph -->
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"verticalAlignment":"center","width":"33.33%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:33.33%"><!-- wp:yoast/job-apply-button {"placeholder":"Apply button (add a link)"} -->
<div class="yoast-inner-container"><div><a class="wp-block-button__link">Apply now</a></div></div>
<!-- /wp:yoast/job-apply-button --></div>
<!-- /wp:column -->
<!-- wp:column {"verticalAlignment":"center","width":"66.66%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:66.66%"><!-- wp:yoast/job-expiration {"expirationDate":"2021-05-19"} -->
<div class="yoast-inner-container"><strong data-id="title">Apply before</strong><div><time datetime="2021-05-19">May 19, 2021</time></div></div>
<!-- /wp:yoast/job-expiration --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- wp:separator {"align":"wide"} -->
<hr class="wp-block-separator alignwide"/>
<!-- /wp:separator -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->';
}
}

View File

@@ -0,0 +1,43 @@
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.Invalid
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
namespace Yoast\WP\SEO\Schema_Templates\Block_Patterns;
/**
* A minimal job posting, containing required blocks only.
*/
class Job_Posting_Minimal extends Job_Posting_Base_Pattern {
/**
* Gets the name of this block pattern.
*
* @return string The name of this block pattern.
*/
public function get_name() {
return 'yoast/job-posting/minimal';
}
/**
* Gets the title of this block pattern.
*
* @return string The title of this block pattern.
*/
public function get_title() {
return 'Job Posting (minimal)';
}
/**
* Gets the contents of this block pattern.
*
* @return string The contents of this block pattern.
*/
public function get_content() {
return '<!-- wp:yoast/job-description {"yoast-schema":null} -->
<div class="yoast-inner-container"><p data-id="description"></p></div>
<!-- /wp:yoast/job-description -->
<!-- wp:yoast/job-location -->
<div class="yoast-inner-container"></div>
<!-- /wp:yoast/job-location -->';
}
}

View File

@@ -0,0 +1,126 @@
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.Invalid
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
// phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
namespace Yoast\WP\SEO\Schema_Templates\Block_Patterns;
/**
* A job posting as seen on Yoast.com.
*/
class Job_Posting_Yoast_Com extends Job_Posting_Base_Pattern {
/**
* Gets the name of this block pattern.
*
* @return string The name of this block pattern.
*/
public function get_name() {
return 'yoast/job-posting/yoast';
}
/**
* Gets the title of this block pattern.
*
* @return string The title of this block pattern.
*/
public function get_title() {
return 'Job Posting (yoast.com)';
}
/**
* Gets the contents of this block pattern.
*
* @return string The contents of this block pattern.
*/
public function get_content() {
return '<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:yoast/job-employment-type {"title_level":2,"employmentType":"FULL_TIME"} -->
<div class="yoast-inner-container"><h2 data-id="title">Employment</h2><span data-id="employmentType" data-value="FULL_TIME">Full time</span></div>
<!-- /wp:yoast/job-employment-type --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:yoast/job-salary -->
<div class="yoast-inner-container"><!-- wp:yoast/job-base-salary {"currency":"USD","value":"4000","unit":"MONTH"} -->
<div class="yoast-inner-container"><h3 data-id="title">Base salary</h3><div class="yoast-schema-flex"><span data-id="currency" data-value="USD">USD</span> 4000 / <span data-id="unit" data-value="MONTH">month</span></div></div>
<!-- /wp:yoast/job-base-salary --></div>
<!-- /wp:yoast/job-salary --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- wp:separator {"align":"wide"} -->
<hr class="wp-block-separator alignwide"/>
<!-- /wp:separator -->
<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:paragraph {"style":{"typography":{"fontSize":24}}} -->
<p style="font-size:24px">Yoast is growing! And were searching for an ambitious UX designer! Do you want to work on software that is used by over 12 million people worldwide? Do you believe that good design can make the complex field of SEO more accessible to an even larger audience? If you do, then were looking for you!</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 id="h-about-the-job">About the job</h2>
<!-- /wp:heading -->
<!-- wp:yoast/job-description -->
<div class="yoast-inner-container"><p data-id="description">As UX designer, youll be part of a multidisciplinary squad, consisting of developers, a tester, and a product owner. Together youll work on pushing Yoast SEO forward. Your squad will be partly based in the Netherlands, and partly in other places within a similar time zone.<br><br>Besides working within a squad on a daily basis, youre also part of our UX tribe, consisting of other UX designers and - researchers. As part of this tribe you help improve our design system and our design processes. You contribute to develop a shared vision.</p></div>
<!-- /wp:yoast/job-description -->
<!-- wp:heading -->
<h2 id="h-about-you">About you</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Do you love diving into details? And do you care deeply about creating visually appealing experiences? But are you also convinced that creativity is found in truly understanding a problem and in finding the right solution?</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>We encourage out-of-the-box thinking (we love new ideas!), but we also value a pragmatic attitude. You respect the scope of the project, how your choices impact others and what possible trade-offs are. You understand that your designs are not a work of art, but a means to building a product. A product that you build together with your teammates.</p>
<!-- /wp:paragraph -->
<!-- wp:yoast/job-requirements {"title_level":2} -->
<div class="yoast-inner-container"><h2 data-id="title">Requirements</h2><ul data-id="requirements"><li>You enjoy working as part of a close-knit team. Together with your squad members, youre responsible for fleshing out product ideas, bringing them to life and shipping them to our users.</li><li>You are passionate about information architecture and are comfortable working with design systems and - patterns.</li><li>You are able to create highly detailed designs and prototypes, but also fast proof of concepts.</li><li>You are comfortable with modern design tools (Sketch is the tool we use).</li><li>If you have experience with HTML, CSS and JS, we consider that a bonus.</li><li>If you have experience with WordPress and the field of SEO, we also consider that a bonus.</li></ul></div>
<!-- /wp:yoast/job-requirements -->
<!-- wp:yoast/job-benefits {"title_level":2} -->
<div class="yoast-inner-container"><h2 data-id="title">Benefits</h2><ul data-id="benefits"><li>A challenging job in a fast-growing, dynamic, ambitious and international atmosphere.</li><li>Working at a company that impacts the web.</li><li>Exercise and stay fit! We have our own gym and a personal trainer!</li><li>We have a really fun (slightly crazy) company culture with lots and lots of team building activities. The know-your-colleagues-quiz, lots of celebrations and LEGO-building days. Because of Covid a lot of these things are online now!</li><li>The opportunity to learn a lot in a short time, at one of the leading SEO companies.</li></ul></div>
<!-- /wp:yoast/job-benefits -->
<!-- wp:paragraph -->
<p>Are you interested?<strong>&nbsp;Then respond before May 19, 2021.</strong>&nbsp;The application procedure consists of three interviews. Do you have questions? We\'ll be happy to answer them. Please send an email to jobs@yoast.com.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:yoast/job-location -->
<div class="yoast-inner-container"><!-- wp:yoast/office-location -->
<div class="yoast-inner-container"><h3 data-id="Location">Location</h3><!-- wp:yoast/job-location-address -->
<div class="yoast-job-block__location__address yoast-inner-container"><span data-id="address">Dierenstraat 2021</span></div>
<!-- /wp:yoast/job-location-address -->
<!-- wp:yoast/job-location-postal-code -->
<div class="yoast-job-block__location__postal-code yoast-inner-container"><span data-id="postal-code">1234 AB</span></div>
<!-- /wp:yoast/job-location-postal-code -->
<!-- wp:yoast/job-location-city -->
<div class="yoast-job-block__location__city yoast-inner-container"><span data-id="city">Wijchen</span></div>
<!-- /wp:yoast/job-location-city -->
<!-- wp:yoast/job-location-country -->
<div class="yoast-job-block__location__country yoast-inner-container"><span data-id="country">Netherlands</span></div>
<!-- /wp:yoast/job-location-country --></div>
<!-- /wp:yoast/office-location --></div>
<!-- /wp:yoast/job-location -->
<!-- wp:yoast/job-apply-button {"placeholder":"Apply button (add a link)"} -->
<div class="yoast-inner-container"><div><a class="wp-block-button__link">Apply now</a></div></div>
<!-- /wp:yoast/job-apply-button -->
<!-- wp:yoast/job-expiration {"expirationDate":"2021-05-21"} -->
<div class="yoast-inner-container"><strong data-id="title">Closes on</strong><div><time datetime="2021-05-21">May 21, 2021</time></div></div>
<!-- /wp:yoast/job-expiration --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->';
}
}

View File

@@ -0,0 +1,15 @@
<?php
/**
* Job apply button block template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-apply-button" title="<?php esc_attr_e( 'Apply button', 'wordpress-seo-premium' ); ?>" category="yoast-recommended-job-blocks" description="<?php esc_attr_e( 'A button through which visitors can apply for the job. (Make sure to add a link.)', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_cursor_click(); ?>" supports={"multiple": false} }}
<div class="yoast-job-block__apply-button {{class-name}}">
{{link-button name="apply_button" placeholder="<?php esc_attr_e( 'Apply button (add a link)', 'wordpress-seo-premium' ); ?>" }}
</div>

View File

@@ -0,0 +1,46 @@
<?php
/**
* Job base salary block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
$wpseo_time_unit_options = [
[
'value' => 'HOUR',
'label' => __( 'hour', 'wordpress-seo-premium' ),
],
[
'value' => 'DAY',
'label' => __( 'day', 'wordpress-seo-premium' ),
],
[
'value' => 'WEEK',
'label' => __( 'week', 'wordpress-seo-premium' ),
],
[
'value' => 'MONTH',
'label' => __( 'month', 'wordpress-seo-premium' ),
],
[
'value' => 'YEAR',
'label' => __( 'year', 'wordpress-seo-premium' ),
],
];
// phpcs:disable Yoast.Yoast.AlternativeFunctions.json_encode_wp_json_encode -- We do not want any pretty printing, since it would break the schema blocks.
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-base-salary" title="<?php esc_attr_e( 'Base salary', 'wordpress-seo-premium' ); ?>" category="common" description="<?php esc_attr_e( 'The base salary of the job.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_currency_dollar(); ?>" parent=[ "yoast/job-salary" ] supports={"multiple": false} }}
<div class="yoast-job-block__salary {{class-name}}">
<div>
{{rich-text name="title" tag="strong" keepPlaceholderOnFocus=true default="<?php esc_attr_e( 'Base salary', 'wordpress-seo-premium' ); ?>"}}
</div>
<div class="yoast-schema-flex">
{{currency-select name="currency" hideLabelFromVision=true label="<?php esc_attr_e( 'Currency', 'wordpress-seo-premium' ); ?>" className="yoast-schema-select"}}&nbsp;
{{text-input name="value" type="number" hideLabelFromVision=true placeholder="<?php esc_attr_e( 'Enter amount', 'wordpress-seo-premium' ); ?>" label="<?php esc_attr_e( 'Value', 'wordpress-seo-premium' ); ?>" }}
&nbsp;/&nbsp;{{select name="unit" label="<?php esc_attr_e( 'Unit', 'wordpress-seo-premium' ); ?>" hideLabelFromVision=true className="yoast-schema-select" options=<?php echo \wp_json_encode( $wpseo_time_unit_options ); ?> defaultValue="MONTH"}}
</div>
</div>

View File

@@ -0,0 +1,11 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-base-salary" only-nested=true}}
{
"@type": "MonetaryAmount",
"currency": {{attribute name="currency"}},
"value": {
"@type": "QuantitativeValue",
"value": {{attribute name="value"}},
"unitText": {{attribute name="unit"}}
}
}

View File

@@ -0,0 +1,16 @@
<?php
/**
* Job benefits block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-benefits" category="yoast-recommended-job-blocks" description="<?php esc_attr_e( 'The description of benefits associated with the job.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_clipboard_check(); ?>" supports={"multiple": false} title="<?php esc_attr_e( 'Benefits', 'wordpress-seo-premium' ); ?>" }}
<div class="yoast-job-block__benefits {{class-name}}">
{{heading name="title" defaultHeadingLevel=3 default="<?php esc_attr_e( 'Benefits', 'wordpress-seo-premium' ); ?>" }}
{{rich-text name="benefits" tag="ul" multiline="li" keepPlaceholderOnFocus=true placeholder="<?php esc_attr_e( 'Enter benefit', 'wordpress-seo-premium' ); ?>" }}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-benefits" only-nested=true }}
{{list name="benefits" tag="li" allowed-tags=[ "h1","h2","h3","h4","h5","h6","br","a","p","b","strong","i","em" ] }}

View File

@@ -0,0 +1,15 @@
<?php
/**
* Job description block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-description" title="<?php esc_attr_e( 'Job description', 'wordpress-seo-premium' ); ?>" category="yoast-required-job-blocks" description="<?php esc_attr_e( 'The description of the job.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_identification(); ?>" supports={"multiple": false} }}
<div class="yoast-job-block__description {{class-name}}">
{{rich-text name="description" required=true tag="p" keepPlaceholderOnFocus=true placeholder="<?php esc_attr_e( 'Enter a job description...', 'wordpress-seo-premium' ); ?>"}}
</div>

View File

@@ -0,0 +1,5 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-description" only-nested=true}}
{
"name": {{html name="description"}}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* Job employment block template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
$wpseo_employment_type_options = [
[
'value' => 'FULL_TIME',
'label' => __( 'Full time', 'wordpress-seo-premium' ),
],
[
'value' => 'PART_TIME',
'label' => __( 'Part time', 'wordpress-seo-premium' ),
],
[
'value' => 'CONTRACTOR',
'label' => __( 'Contractor', 'wordpress-seo-premium' ),
],
[
'value' => 'TEMPORARY',
'label' => __( 'Temporary', 'wordpress-seo-premium' ),
],
];
// phpcs:disable Yoast.Yoast.AlternativeFunctions.json_encode_wp_json_encode -- We do not want any pretty printing, since it would break the schema blocks.
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-employment-type" title="<?php esc_attr_e( 'Employment', 'wordpress-seo-premium' ); ?>" category="yoast-recommended-job-blocks" description="<?php esc_attr_e( 'The type of employment (e.g. full-time, part-time, contract, temporary, seasonal, internship).', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_document_text(); ?>" supports={"multiple": false} }}
<div class="yoast-job-block__employment {{class-name}}">
<div>
{{rich-text name="title" tag="strong" keepPlaceholderOnFocus=true default="<?php esc_attr_e( 'Employment', 'wordpress-seo-premium' ); ?>"}}
</div>
<div>
{{select tag="span" name="employmentType" label="<?php esc_attr_e( 'Employment', 'wordpress-seo-premium' ); ?>" options=<?php echo \wp_json_encode( $wpseo_employment_type_options ); ?> hideLabelFromVision=true }}
{{sidebar-checkbox name="isInternship" label="<?php esc_attr_e( 'This is an internship', 'wordpress-seo-premium' ); ?>" output=", <?php esc_attr_e( 'this is an internship', 'wordpress-seo-premium' ); ?>" }}
{{sidebar-checkbox name="isVolunteer" label="<?php esc_attr_e( 'This is a volunteer role', 'wordpress-seo-premium' ); ?>" output=", <?php esc_attr_e( 'this is a volunteer role', 'wordpress-seo-premium' ); ?>" }}
</div>
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-employment-type" only-nested=true}}
{{job-employment-type }}

View File

@@ -0,0 +1,16 @@
<?php
/**
* Job expiration block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-expiration" title="<?php esc_attr_e( 'Job expiration date', 'wordpress-seo-premium' ); ?>" category="yoast-recommended-job-blocks" description="<?php esc_attr_e( 'The date after which the job posting is not valid anymore.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_ban(); ?>" supports={"multiple": false} }}
<div class="yoast-job-block__closing-date {{class-name}}">
{{rich-text name="title" tag="span" default="<?php esc_attr_e( 'Closes on', 'wordpress-seo-premium' ); ?>"}}&nbsp;
{{date name="expirationDate" }}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-expiration" only-nested=true}}
{{attribute name="expirationDate"}}

View File

@@ -0,0 +1,15 @@
<?php
/**
* Job location address block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-location-address" title="<?php esc_attr_e( 'Address', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'The street address. For example, 111 South Grand Avenue.', 'wordpress-seo-premium' ); ?>" category="yoast-required-job-blocks" description="<?php esc_attr_e( 'The address where the office is located.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_grid(); ?>" parent=[ "yoast/office-location" ] supports={"multiple": false} }}
<div class="yoast-job-block__location__address {{class-name}}">
{{rich-text required=true name="address" tag="span" keepPlaceholderOnFocus=true placeholder="<?php esc_attr_e( 'Enter street address', 'wordpress-seo-premium' ); ?>"}}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-location-address" only-nested=true}}
{{html name="address"}}

View File

@@ -0,0 +1,15 @@
<?php
/**
* Job location city block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-location-city" title="<?php esc_attr_e( 'City', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'The city in which the street address is, and which is in the region. For example, Los Angeles.', 'wordpress-seo-premium' ); ?>" category="yoast-required-job-blocks" icon="<?php echo Icons::heroicons_grid(); ?>" parent=[ "yoast/office-location" ] supports={"multiple": false} }}
<div class="yoast-job-block__location__city {{class-name}}">
{{rich-text required=true name="city" tag="span" keepPlaceholderOnFocus=true placeholder="<?php esc_attr_e( 'Enter city', 'wordpress-seo-premium' ); ?>"}}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-location-city" only-nested=true}}
{{html name="city"}}

View File

@@ -0,0 +1,15 @@
<?php
/**
* Job location Country block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contain safe svg.
?>
{{block name="yoast/job-location-country" title="<?php esc_attr_e( 'Country', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'The country. For example, USA.', 'wordpress-seo-premium' ); ?>" category="yoast-required-job-blocks" icon="<?php echo Icons::heroicons_grid(); ?>" description="<?php esc_attr_e( 'The country. For example, USA.', 'wordpress-seo-premium' ); ?>" parent=[ "yoast/office-location" ] supports={"multiple": false} }}
<div class="yoast-job-block__location__country {{class-name}}">
{{rich-text required=true name="country" tag="span" keepPlaceholderOnFocus=true placeholder="<?php esc_attr_e( 'Enter country', 'wordpress-seo-premium' ); ?>"}}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-location-country" only-nested=true}}
{{html name="country"}}

View File

@@ -0,0 +1,15 @@
<?php
/**
* Job location postal code block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-location-postal-code" title="<?php esc_attr_e( 'Postal code', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'The postal code. For example, 90012.', 'wordpress-seo-premium' ); ?>" category="yoast-required-job-blocks" icon="<?php echo Icons::heroicons_grid(); ?>" parent=[ "yoast/office-location" ] supports={"multiple": false} }}
<div class="yoast-job-block__location__postal-code {{class-name}}">
{{rich-text required=true name="postal-code" tag="span" keepPlaceholderOnFocus=true placeholder="<?php esc_attr_e( 'Enter postal code', 'wordpress-seo-premium' ); ?>"}}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-location-postal-code" only-nested=true}}
{{html name="postal-code"}}

View File

@@ -0,0 +1,15 @@
<?php
/**
* Job location State/Province/Region block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-location-region" title="<?php esc_attr_e( 'State/Province/Region', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'The state, province or region in which the city is, and which is in the country. For example, California.', 'wordpress-seo-premium' ); ?>" category="yoast-required-job-blocks" icon="<?php echo Icons::heroicons_grid(); ?>" description="<?php esc_attr_e( 'The state, province or region in which the city is, and which is in the country. For example, California.', 'wordpress-seo-premium' ); ?>" parent=[ "yoast/office-location" ] supports={"multiple": false} }}
<div class="yoast-job-block__location__region {{class-name}}">
{{rich-text required=true name="region" tag="span" keepPlaceholderOnFocus=true placeholder="<?php esc_attr_e( 'Enter state/province/region', 'wordpress-seo-premium' ); ?>"}}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-location-region" only-nested=true}}
{{html name="region"}}

View File

@@ -0,0 +1,18 @@
<?php
/**
* Job location block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-location" title="<?php esc_attr_e( 'Location', 'wordpress-seo-premium' ); ?>" category="yoast-required-job-blocks" description="<?php esc_attr_e( 'The (typically single) geographic location associated with the job.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_location_marker(); ?>" supports={"multiple": false} }}
<div class={{class-name}}>
{{variation name="office-location" title="<?php esc_attr_e( 'Office location', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'Address where the office is located', 'wordpress-seo-premium' ); ?>" scope=[ "block" ] icon="<?php echo Icons::heroicons_office_building( Icons::SIZE_VARIATION ); ?>" innerBlocks=[ { "name": "yoast/office-location", "attributes": { "address-title": "<?php esc_attr_e( 'Address', 'wordpress-seo-premium' ); ?>", "postal-code-title": "<?php esc_attr_e( 'Postal code', 'wordpress-seo-premium' ); ?>", "city-title": "<?php esc_attr_e( 'City', 'wordpress-seo-premium' ); ?>", "region-title": "<?php esc_attr_e( 'Region', 'wordpress-seo-premium' ); ?>", "country-title": "<?php esc_attr_e( 'Country', 'wordpress-seo-premium' ); ?>" } }] }}
{{variation name="remote-location" title="<?php esc_attr_e( 'Remote job', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'This job is 100% remote', 'wordpress-seo-premium' ); ?>" scope=[ "block" ] icon="<?php echo Icons::heroicons_globe( Icons::SIZE_VARIATION ); ?>" innerBlocks=[ { "name": "yoast/remote-location" } ]}}
{{inner-blocks appender=false}}
{{variation-picker required=true}}
</div>

View File

@@ -0,0 +1,32 @@
<?php
/**
* Job office location block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
$yoast_seo_block_template = [
[ 'yoast/job-location-address' ],
[ 'yoast/job-location-postal-code' ],
[ 'yoast/job-location-city' ],
[ 'yoast/job-location-region' ],
[ 'yoast/job-location-country' ],
];
$yoast_seo_required_blocks = [
[ 'name' => 'yoast/job-location-address' ],
[ 'name' => 'yoast/job-location-postal-code' ],
[ 'name' => 'yoast/job-location-city' ],
[ 'name' => 'yoast/job-location-region' ],
[ 'name' => 'yoast/job-location-country' ],
];
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/office-location" title="<?php esc_attr_e( 'Office location', 'wordpress-seo-premium' ); ?>" category="common" description="<?php esc_attr_e( 'The address where the office is located.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_office_building(); ?>" parent=[ "yoast/job-location" ] supports={"multiple": false} }}
<div class="yoast-job-block__location {{class-name}}">
{{heading name="<?php esc_attr_e( 'Location', 'wordpress-seo-premium' ); ?>" value="<?php esc_attr_e( 'Location', 'wordpress-seo-premium' ); ?>" defaultHeadingLevel=3 }}
{{inner-blocks template=<?php echo WPSEO_Utils::format_json_encode( $yoast_seo_block_template ); ?> appender="button" appenderLabel="<?php esc_attr_e( 'Add additional information to your location details...', 'wordpress-seo-premium' ); ?>" }}
</div>

View File

@@ -0,0 +1,13 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/office-location" only-nested=true }}
{
"@type": "Place",
"address": {
"@type": "PostalAddress",
"streetAddress": {{inner-blocks allowed-blocks=[ "yoast/job-location-address" ] only-first=true }},
"addressLocality": {{inner-blocks allowed-blocks=[ "yoast/job-location-city" ] only-first=true }},
"addressRegion": {{inner-blocks allowed-blocks=[ "yoast/job-location-region" ] only-first=true }},
"postalCode": {{inner-blocks allowed-blocks=[ "yoast/job-location-postal-code" ] only-first=true }},
"addressCountry": {{inner-blocks allowed-blocks=[ "yoast/job-location-country" ] only-first=true }}
}
}

View File

@@ -0,0 +1,21 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-posting" }}
{
"@type": "JobPosting",
"title": "{{attribute name="job-title" }}",
"description": {{inner-blocks-html blocks={ "yoast/job-description": "description" } null-when-empty=true allowed-tags=[ "h1","h2","h3","h4","h5","h6","br","a","p","b","strong","i","em", "ul", "ol", "li" ] }},
"datePosted": "%%post_date%%",
"validThrough": {{inner-blocks allowed-blocks=[ "yoast/job-expiration" ] only-first=true }},
"employmentType": {{inner-blocks allowed-blocks=[ "yoast/job-employment-type" ] only-first=true }},
"hiringOrganization": {
"@id": "%%organization_id%%"
},
"mainEntityOfPage": {
"@id": "%%main_schema_id%%"
},
"jobLocation": {{inner-blocks allowed-blocks=[ "yoast/office-location" ] only-first=true }},
"jobLocationType": {{inner-blocks allowed-blocks=[ "yoast/remote-location" ] only-first=true }},
"experienceRequirements": {{inner-blocks allowed-blocks=[ "yoast/job-requirements" ] only-first=true }},
"jobBenefits": {{inner-blocks allowed-blocks=[ "yoast/job-benefits" ] only-first=true }},
"baseSalary": {{inner-blocks allowed-blocks=[ "yoast/job-base-salary", "yoast/job-salary-range" ] only-first=true }}
}

View File

@@ -0,0 +1,16 @@
<?php
/**
* Job remote location block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/remote-location" title="<?php esc_attr_e( 'Remote job', 'wordpress-seo-premium' ); ?>" category="common" description="<?php esc_attr_e( 'This job is 100% remote.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_globe(); ?>" parent=[ "yoast/job-location" ] supports={"multiple": false} }}
<div class="yoast-job-block__location {{class-name}}">
{{heading name="<?php esc_attr_e( 'Location', 'wordpress-seo-premium' ); ?>" defaultHeadingLevel=3 value="<?php esc_attr_e( 'Location', 'wordpress-seo-premium' ); ?>"}}
{{rich-text required=true tag="p" name="remote-location" default="<?php esc_attr_e( 'This job is 100% remote.', 'wordpress-seo-premium' ); ?>"}}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/remote-location" only-nested=true }}
"TELECOMMUTE"

View File

@@ -0,0 +1,16 @@
<?php
/**
* Job requirements block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-requirements" title="<?php esc_attr_e( 'Requirements', 'wordpress-seo-premium' ); ?>" category="yoast-recommended-job-blocks" description="<?php esc_attr_e( 'The description of skills and experience needed for the position.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_clipboard_list(); ?>" supports={"multiple": false} }}
<div class="yoast-job-block__requirements {{class-name}}">
{{heading name="title" defaultHeadingLevel=3 default="<?php esc_attr_e( 'Requirements', 'wordpress-seo-premium' ); ?>" }}
{{rich-text name="requirements" tag="ul" multiline="li" keepPlaceholderOnFocus=true placeholder="<?php esc_attr_e( 'Enter requirement', 'wordpress-seo-premium' ); ?>" }}
</div>

View File

@@ -0,0 +1,3 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-requirements" only-nested=true }}
{{list name="requirements" tag="li" allowed-tags=[ "h1","h2","h3","h4","h5","h6","br","a","p","b","strong","i","em" ] }}

View File

@@ -0,0 +1,49 @@
<?php
/**
* Job salary range block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
$wpseo_time_unit_options = [
[
'value' => 'HOUR',
'label' => __( 'hour', 'wordpress-seo-premium' ),
],
[
'value' => 'DAY',
'label' => __( 'day', 'wordpress-seo-premium' ),
],
[
'value' => 'WEEK',
'label' => __( 'week', 'wordpress-seo-premium' ),
],
[
'value' => 'MONTH',
'label' => __( 'month', 'wordpress-seo-premium' ),
],
[
'value' => 'YEAR',
'label' => __( 'year', 'wordpress-seo-premium' ),
],
];
// phpcs:disable Yoast.Yoast.AlternativeFunctions.json_encode_wp_json_encode -- We do not want any pretty printing, since it would break the schema blocks.
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-salary-range" title="<?php esc_attr_e( 'Salary range', 'wordpress-seo-premium' ); ?>" category="common" description="<?php esc_attr_e( 'The salary range of the job, depending on a variety of factors (e.g. education level or level of experience).', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_switch_horizontal(); ?>" parent=[ "yoast/job-salary" ] supports={"multiple": false} }}
<div class="yoast-job-block__salary {{class-name}}">
<div>
{{rich-text name="title" tag="strong" keepPlaceholderOnFocus=true default="<?php esc_attr_e( 'Salary range', 'wordpress-seo-premium' ); ?>"}}
</div>
<div class="yoast-schema-flex">
{{currency-select name="currency" hideLabelFromVision=true label="<?php esc_attr_e( 'Currency', 'wordpress-seo-premium' ); ?>" className="yoast-schema-select"}}
&nbsp;{{text-input name="minValue" type="number" hideLabelFromVision=true placeholder="<?php esc_attr_e( 'Enter amount', 'wordpress-seo-premium' ); ?>" label="<?php esc_attr_e( 'Min value', 'wordpress-seo-premium' ); ?>" }}
&nbsp;-&nbsp;
{{text-input name="maxValue" type="number" hideLabelFromVision=true placeholder="<?php esc_attr_e( 'Enter amount', 'wordpress-seo-premium' ); ?>" label="<?php esc_attr_e( 'Max value', 'wordpress-seo-premium' ); ?>" }}
&nbsp;/&nbsp;
{{select name="unit" label="<?php esc_attr_e( 'Unit', 'wordpress-seo-premium' ); ?>" hideLabelFromVision=true className="yoast-schema-select" options=<?php echo \wp_json_encode( $wpseo_time_unit_options ); ?> defaultValue="MONTH"}}
</div>
</div>

View File

@@ -0,0 +1,12 @@
<?php // phpcs:ignore Internal.NoCodeFound ?>
{{schema name="yoast/job-salary-range" only-nested=true}}
{
"@type": "MonetaryAmount",
"currency": {{attribute name="currency"}},
"value": {
"@type": "QuantitativeValue",
"minValue": {{attribute name="minValue"}},
"maxValue": {{attribute name="maxValue"}},
"unitText": {{attribute name="unit"}}
}
}

View File

@@ -0,0 +1,18 @@
<?php
/**
* Job salary block schema template.
*
* @package Yoast\WP\SEO\Schema_Templates
*/
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;
// phpcs:disable WordPress.Security.EscapeOutput -- Reason: The Icons contains safe svg.
?>
{{block name="yoast/job-salary" title="<?php esc_attr_e( 'Base salary', 'wordpress-seo-premium' ); ?>" category="yoast-recommended-job-blocks" description="<?php esc_attr_e( 'The base salary of the job.', 'wordpress-seo-premium' ); ?>" icon="<?php echo Icons::heroicons_currency_dollar(); ?>" supports={"multiple": false} }}
<div class={{class-name}}>
{{variation name="base-salary" title="<?php esc_attr_e( 'Base salary', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'The base salary of the job.', 'wordpress-seo-premium' ); ?>" scope=[ "block" ] icon="<?php echo Icons::heroicons_currency_dollar( Icons::SIZE_VARIATION ); ?>" innerBlocks=[ { "name": "yoast/job-base-salary" }] }}
{{variation name="salary-range" title="<?php esc_attr_e( 'Salary range', 'wordpress-seo-premium' ); ?>" description="<?php esc_attr_e( 'The salary range of the job, depending on a variety of factors (e.g. a candidate\'s education level or level of experience).', 'wordpress-seo-premium' ); ?>" scope=[ "block" ] icon="<?php echo Icons::heroicons_switch_horizontal( Icons::SIZE_VARIATION ); ?>" innerBlocks=[ { "name": "yoast/job-salary-range" } ]}}
{{inner-blocks appender=false}}
{{variation-picker}}
</div>