WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта
функция не описана

Yoast\WP\SEO\Builders

Indexable_Builder::save_indexable() private Yoast 1.0

Saves and returns an indexable (on production environments only).

{} Это метод класса: Indexable_Builder{}

Возвращает

Indexable. The indexable.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->save_indexable( $indexable, $indexable_before );
$indexable(Indexable) (обязательный)
The indexable.
$indexable_before(Indexable|null)
The indexable before possible changes.

Код Indexable_Builder::save_indexable() Yoast 16.8

<?php
private function save_indexable( $indexable, $indexable_before = null ) {
	$intend_to_save = $this->indexable_helper->should_index_indexables();

	/**
	 * Filter: 'wpseo_override_save_indexable' - Allow developers to enable / disable
	 * saving the indexable when the indexable is updated. Warning: overriding
	 * the intended action may cause problems when moving from a staging to a
	 * production environment because indexable permalinks may get set incorrectly.
	 *
	 * @param Indexable $indexable The indexable to be saved.
	 *
	 * @api bool $intend_to_save True if YoastSEO intends to save the indexable.
	 */
	$intend_to_save = \apply_filters( 'wpseo_should_save_indexable', $intend_to_save, $indexable );

	if ( ! $intend_to_save ) {
		return $indexable;
	}

	// Save the indexable before running the WordPress hook.
	$indexable->save();

	if ( $indexable_before ) {
		/**
		 * Action: 'wpseo_save_indexable' - Allow developers to perform an action
		 * when the indexable is updated.
		 *
		 * @param Indexable $indexable_before The indexable before saving.
		 *
		 * @api Indexable $indexable The saved indexable.
		 */
		\do_action( 'wpseo_save_indexable', $indexable, $indexable_before );
	}

	return $indexable;
}