Submit
Path:
~
/
home
/
b
/
f
/
x
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
helpers
/
File Content:
indexable-helper.php
<?php namespace Yoast\WP\SEO\Helpers; use Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Indexation_Action; use Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action; use Yoast\WP\SEO\Actions\Indexing\Indexable_Term_Indexation_Action; use Yoast\WP\SEO\Config\Indexing_Reasons; use Yoast\WP\SEO\Models\Indexable; use Yoast\WP\SEO\Repositories\Indexable_Repository; /** * A helper object for indexables. */ class Indexable_Helper { /** * Represents the indexable repository. * * @var Indexable_Repository */ protected $repository; /** * Represents the options helper. * * @var Options_Helper */ protected $options_helper; /** * Represents the environment helper. * * @var Environment_Helper */ protected $environment_helper; /** * Represents the indexing helper. * * @var Indexing_Helper */ protected $indexing_helper; /** * Indexable_Helper constructor. * * @param Options_Helper $options_helper The options helper. * @param Environment_Helper $environment_helper The environment helper. * @param Indexing_Helper $indexing_helper The indexing helper. */ public function __construct( Options_Helper $options_helper, Environment_Helper $environment_helper, Indexing_Helper $indexing_helper ) { $this->options_helper = $options_helper; $this->environment_helper = $environment_helper; $this->indexing_helper = $indexing_helper; } /** * Sets the indexable repository. Done to avoid circular dependencies. * * @required * * @param Indexable_Repository $repository The indexable repository. */ public function set_indexable_repository( Indexable_Repository $repository ) { $this->repository = $repository; } /** * Returns the page type of an indexable. * * @param Indexable $indexable The indexable. * * @return string|false The page type. False if it could not be determined. */ public function get_page_type_for_indexable( $indexable ) { switch ( $indexable->object_type ) { case 'post': $front_page_id = (int) \get_option( 'page_on_front' ); if ( $indexable->object_id === $front_page_id ) { return 'Static_Home_Page'; } $posts_page_id = (int) \get_option( 'page_for_posts' ); if ( $indexable->object_id === $posts_page_id ) { return 'Static_Posts_Page'; } return 'Post_Type'; case 'term': return 'Term_Archive'; case 'user': return 'Author_Archive'; case 'home-page': return 'Home_Page'; case 'post-type-archive': return 'Post_Type_Archive'; case 'date-archive': return 'Date_Archive'; case 'system-page': if ( $indexable->object_sub_type === 'search-result' ) { return 'Search_Result_Page'; } if ( $indexable->object_sub_type === '404' ) { return 'Error_Page'; } } return false; } /** * Resets the permalinks of the indexables. * * @param string|null $type The type of the indexable. * @param string|null $subtype The subtype. Can be null. * @param string $reason The reason that the permalink has been changed. */ public function reset_permalink_indexables( $type = null, $subtype = null, $reason = Indexing_Reasons::REASON_PERMALINK_SETTINGS ) { $result = $this->repository->reset_permalink( $type, $subtype ); $this->indexing_helper->set_reason( $reason ); if ( $result !== false && $result > 0 ) { \delete_transient( Indexable_Post_Indexation_Action::TRANSIENT_CACHE_KEY ); \delete_transient( Indexable_Post_Type_Archive_Indexation_Action::TRANSIENT_CACHE_KEY ); \delete_transient( Indexable_Term_Indexation_Action::TRANSIENT_CACHE_KEY ); } } /** * Determines whether indexing indexables is appropriate at this time. * * @return bool Whether or not the indexables should be indexed. */ public function should_index_indexables() { // Currently the only reason to index is when we're on a production website. return $this->environment_helper->is_production_mode(); } /** * Returns whether or not dynamic permalinks should be used. * * @return bool Whether or not the dynamic permalinks should be used. */ public function dynamic_permalinks_enabled() { /** * Filters the value of the `dynamic_permalinks` option. * * @param bool $value The value of the `dynamic_permalinks` option. */ return (bool) \apply_filters( 'wpseo_dynamic_permalinks_enabled', $this->options_helper->get( 'dynamic_permalinks', false ) ); } /** * Sets a boolean to indicate that the indexing of the indexables has completed. * * @return void */ public function finish_indexing() { $this->options_helper->set( 'indexables_indexing_completed', true ); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
open-graph
---
0755
schema
---
0755
twitter
---
0755
.DS_Store
10234 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
asset-helper.php
2569 bytes
0644
author-archive-helper.php
3531 bytes
0644
bing-presenter.php
638 bytes
0644
blocks-helper.php
2317 bytes
0644
class-metabox-formatter-20260707044405.php
12602 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin-20260707122142.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-tracking-server-data.php
1989 bytes
0644
class-wpseo-replacement-variable.php
1375 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.pack.database.php
30838 bytes
0644
ctrl.package.php
17073 bytes
0644
current-page-helper.php
12153 bytes
0644
date-helper.php
2846 bytes
0644
define.php
4567 bytes
0644
description-presenter-20260623011438.php
1026 bytes
0644
duplicator-20260704004435.php
1781 bytes
0644
duplicator-en_US.mo
582 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260706090318.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623171315.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
environment-helper.php
596 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget.php
11167 bytes
0644
get-request-conditional.php
466 bytes
0644
home-url-helper.php
770 bytes
0644
image-helper.php
10231 bytes
0644
inc.data.php
5121 bytes
0644
inc.validator.php
5401 bytes
0644
index-20260705034705.php
38 bytes
0644
index.php
157663 bytes
0644
indexable-helper.php
4687 bytes
0644
indexing-helper.php
8009 bytes
0644
language-helper.php
1801 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
meta-helper.php
2613 bytes
0644
module.php
1297 bytes
0644
notification-helper.php
546 bytes
0644
options-helper.php
3022 bytes
0644
pagination-helper.php
3557 bytes
0644
post-helper.php
4819 bytes
0644
post-type-helper.php
3521 bytes
0644
primary-term-helper.php
1399 bytes
0644
product-helper.php
659 bytes
0644
quick-edit-handler-1650-20260707073901.js
1848 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
recovery.php
1146 bytes
0644
redirect-helper.php
1458 bytes
0644
request-helper.php
352 bytes
0644
require-file-helper.php
305 bytes
0644
robots-helper.php
526 bytes
0644
root.php
1951 bytes
0644
short-link-helper.php
3375 bytes
0644
site-helper.php
566 bytes
0644
social.php
725 bytes
0644
taxonomy-helper.php
3109 bytes
0644
uninstall.php
4401 bytes
0644
url-helper.php
4729 bytes
0644
user-helper.php
3763 bytes
0644
woocommerce-helper.php
879 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-es_CR.json
14212 bytes
0644
wordpress-seojs-es_ES.json
20568 bytes
0644
wordpress-seojs-gl_ES-20260704065626.json
20143 bytes
0644
wordpress-seojs-gl_ES.json
20143 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
wp-query-wrapper.php
834 bytes
0644
N4ST4R_ID | Naxtarrr