Yoast\WP\SEO\Actions\Importing\Aioseo

Aioseo_Posts_Importing_Action::post_robots_noindex_import()publicYoast 1.0

Imports the post's noindex setting.

Метод класса: Aioseo_Posts_Importing_Action{}

Хуков нет.

Возвращает

true|false|null. The value of Yoast's noindex setting for the post.

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

$Aioseo_Posts_Importing_Action = new Aioseo_Posts_Importing_Action();
$Aioseo_Posts_Importing_Action->post_robots_noindex_import( $aioseo_robots_settings );
$aioseo_robots_settings(true|false) (обязательный)
AIOSEO's set of robot settings for the post.

Код Aioseo_Posts_Importing_Action::post_robots_noindex_import() Yoast 22.4

public function post_robots_noindex_import( $aioseo_robots_settings ) {
	// If robot settings defer to default settings, we have null in the is_robots_noindex field.
	if ( $aioseo_robots_settings['robots_default'] ) {
		return null;
	}

	return $aioseo_robots_settings['robots_noindex'];
}