Yoast\WP\SEO\Helpers

Robots_Txt_Helper::add_allow()publicYoast 1.0

Add an allow rule for a specific user agent if it does not exist yet.

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

Хуков нет.

Возвращает

null. Ничего.

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

$Robots_Txt_Helper = new Robots_Txt_Helper();
$Robots_Txt_Helper->add_allow( $user_agent, $path );
$user_agent(строка) (обязательный)
The user agent to add the allow rule to.
$path(строка) (обязательный)
The path to add as a allow rule.

Код Robots_Txt_Helper::add_allow() Yoast 19.11

public function add_allow( $user_agent, $path ) {
	$user_agent_container = $this->robots_txt_user_agents->get_user_agent( $user_agent );
	$user_agent_container->add_allow_directive( $path );
}