✘✘ 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.42
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/plugins/wordpress-seo/src/integrations/watchers//indexable-term-watcher.php
<?php

namespace Yoast\WP\SEO\Integrations\Watchers;

use Yoast\WP\SEO\Builders\Indexable_Builder;
use Yoast\WP\SEO\Builders\Indexable_Link_Builder;
use Yoast\WP\SEO\Conditionals\Migrations_Conditional;
use Yoast\WP\SEO\Helpers\Indexable_Helper;
use Yoast\WP\SEO\Helpers\Site_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
use Yoast\WP\SEO\Repositories\Indexable_Repository;

/**
 * Watches Terms/Taxonomies to fill the related Indexable.
 */
class Indexable_Term_Watcher implements Integration_Interface {

	/**
	 * The indexable repository.
	 *
	 * @var Indexable_Repository
	 */
	protected $repository;

	/**
	 * The indexable builder.
	 *
	 * @var Indexable_Builder
	 */
	protected $builder;

	/**
	 * The link builder.
	 *
	 * @var Indexable_Link_Builder
	 */
	protected $link_builder;

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

	/**
	 * Represents the site helper.
	 *
	 * @var Site_Helper
	 */
	protected $site;

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

	/**
	 * Indexable_Term_Watcher constructor.
	 *
	 * @param Indexable_Repository   $repository       The repository to use.
	 * @param Indexable_Builder      $builder          The post builder to use.
	 * @param Indexable_Link_Builder $link_builder     The lint builder to use.
	 * @param Indexable_Helper       $indexable_helper The indexable helper.
	 * @param Site_Helper            $site             The site helper.
	 */
	public function __construct(
		Indexable_Repository $repository,
		Indexable_Builder $builder,
		Indexable_Link_Builder $link_builder,
		Indexable_Helper $indexable_helper,
		Site_Helper $site
	) {
		$this->repository       = $repository;
		$this->builder          = $builder;
		$this->link_builder     = $link_builder;
		$this->indexable_helper = $indexable_helper;
		$this->site             = $site;
	}

	/**
	 * Registers the hooks.
	 *
	 * @return void
	 */
	public function register_hooks() {
		\add_action( 'created_term', [ $this, 'build_indexable' ], \PHP_INT_MAX );
		\add_action( 'edited_term', [ $this, 'build_indexable' ], \PHP_INT_MAX );
		\add_action( 'delete_term', [ $this, 'delete_indexable' ], \PHP_INT_MAX );
	}

	/**
	 * Deletes a term from the index.
	 *
	 * @param int $term_id The Term ID to delete.
	 *
	 * @return void
	 */
	public function delete_indexable( $term_id ) {
		$indexable = $this->repository->find_by_id_and_type( $term_id, 'term', false );

		if ( ! $indexable ) {
			return;
		}

		$indexable->delete();
		\do_action( 'wpseo_indexable_deleted', $indexable );
	}

	/**
	 * Update the taxonomy meta data on save.
	 *
	 * @param int $term_id ID of the term to save data for.
	 *
	 * @return void
	 */
	public function build_indexable( $term_id ) {
		// Bail if this is a multisite installation and the site has been switched.
		if ( $this->site->is_multisite_and_switched() ) {
			return;
		}

		$term = \get_term( $term_id );

		if ( $term === null || \is_wp_error( $term ) ) {
			return;
		}

		if ( ! \is_taxonomy_viewable( $term->taxonomy ) ) {
			return;
		}

		$indexable = $this->repository->find_by_id_and_type( $term_id, 'term', false );

		// If we haven't found an existing indexable, create it. Otherwise update it.
		$indexable = $this->builder->build_for_id_and_type( $term_id, 'term', $indexable );

		if ( ! $indexable ) {
			return;
		}

		// Update links.
		$this->link_builder->build( $indexable, $term->description );

		$indexable->object_last_modified = \max( $indexable->object_last_modified, \current_time( 'mysql' ) );
		$this->indexable_helper->save_indexable( $indexable );
	}
}


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


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
4 Sep 2026 1.58 AM
docteuh / users
0755
addon-update-watcher.php
7.142 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
auto-update-watcher.php
1.494 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827154511.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
indexable-ancestor-watcher.php
8.223 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.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-date-archive-watcher.php
2.528 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.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.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-term-watcher.php
3.67 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
integration-interface.php
0.416 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
primary-category-quick-edit-watcher.php
5.549 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
search-engines-discouraged-watcher.php
6.98 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
uninstall-integration.php
0.982 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
woocommerce-beta-editor-watcher.php
4.152 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

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