__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Yoast\WP\SEO\Builders;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Models\Indexable;
use Yoast\WP\SEO\Values\Indexables\Indexable_Builder_Versions;
/**
* System page builder for the indexables.
*
* Formats system pages ( search and error ) meta to indexable format.
*/
class Indexable_System_Page_Builder {
/**
* Mapping of object type to title option keys.
*/
public const OPTION_MAPPING = [
'search-result' => [
'title' => 'title-search-wpseo',
],
'404' => [
'title' => 'title-404-wpseo',
'breadcrumb_title' => 'breadcrumbs-404crumb',
],
];
/**
* The options helper.
*
* @var Options_Helper
*/
protected $options;
/**
* The latest version of the Indexable_System_Page_Builder.
*
* @var int
*/
protected $version;
/**
* Indexable_System_Page_Builder constructor.
*
* @param Options_Helper $options The options helper.
* @param Indexable_Builder_Versions $versions The latest version of each Indexable Builder.
*/
public function __construct(
Options_Helper $options,
Indexable_Builder_Versions $versions
) {
$this->options = $options;
$this->version = $versions->get_latest_version_for_type( 'system-page' );
}
/**
* Formats the data.
*
* @param string $object_sub_type The object sub type of the system page.
* @param Indexable $indexable The indexable to format.
*
* @return Indexable The extended indexable.
*/
public function build( $object_sub_type, Indexable $indexable ) {
$indexable->object_type = 'system-page';
$indexable->object_sub_type = $object_sub_type;
$indexable->title = $this->options->get( static::OPTION_MAPPING[ $object_sub_type ]['title'] );
$indexable->is_robots_noindex = true;
$indexable->blog_id = \get_current_blog_id();
if ( \array_key_exists( 'breadcrumb_title', static::OPTION_MAPPING[ $object_sub_type ] ) ) {
$indexable->breadcrumb_title = $this->options->get( static::OPTION_MAPPING[ $object_sub_type ]['breadcrumb_title'] );
}
$indexable->version = $this->version;
return $indexable;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| indexable-author-builder.php | File | 7.58 KB | 0775 |
|
| indexable-builder.php | File | 13.07 KB | 0775 |
|
| indexable-date-archive-builder.php | File | 1.65 KB | 0775 |
|
| indexable-hierarchy-builder.php | File | 11.24 KB | 0775 |
|
| indexable-home-page-builder.php | File | 4.35 KB | 0775 |
|
| indexable-link-builder.php | File | 17.85 KB | 0775 |
|
| indexable-post-builder.php | File | 12.19 KB | 0775 |
|
| indexable-post-type-archive-builder.php | File | 5.21 KB | 0775 |
|
| indexable-social-image-trait.php | File | 4.82 KB | 0775 |
|
| indexable-system-page-builder.php | File | 2.11 KB | 0775 |
|
| indexable-term-builder.php | File | 8.52 KB | 0775 |
|
| primary-term-builder.php | File | 2.64 KB | 0775 |
|