HEX
Server: Apache
System: Linux sxb1plmcpnl510113.prod.sxb1.secureserver.net 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User: acnbijigo78q (10488831)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: /home/acnbijigo78q/public_html/wp-content/plugins/wpml-elasticpress/src/Traits/ManageIndexables.php
<?php

namespace WPML\ElasticPress\Traits;

use ElasticPress\Indexables;

trait ManageIndexables {

	use CompareLanguages;

	/** @var Indexables */
	private $indexables;

	/** @var array */
	private $adjustedIndexables = [];

	/**
	 * @return array
	 */
	private function deactivateIndexables() {
		if (
			$this->isCurrentDefaultLanguage()
			|| ! $this->indexables->is_active( \WPML\ElasticPress\Constants::INDEXABLE_SLUG_USER )
		) {
			return [];
		}

		$this->adjustedIndexables[] = \WPML\ElasticPress\Constants::INDEXABLE_SLUG_USER;
		$this->indexables->deactivate( \WPML\ElasticPress\Constants::INDEXABLE_SLUG_USER );
		return $this->adjustedIndexables;
	}

	/**
	 * @param array $forceIndexablesToReset
	 */
	private function reactivateIndexables( $forceIndexablesToReset = [] ) {
		$indexablesToReset = array_unique( array_merge(
			$forceIndexablesToReset,
			$this->adjustedIndexables
		) );
		foreach ( $indexablesToReset as $indexableSlug ) {
			$this->indexables->activate( $indexableSlug );
		}
		$this->adjustedIndexables = [];
	}

}