WPSEO_Replace_Vars::has_been_registered()publicYoast 1.0

Checks whether the given replacement variable has already been registered or not.

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

Хуков нет.


true|false. true if the replacement variable has already been registered.


$WPSEO_Replace_Vars = new WPSEO_Replace_Vars();
$WPSEO_Replace_Vars->has_been_registered( $replacement_variable );
$replacement_variable(строка) (обязательный)
The replacement variable to check, including the variable delimiter (e.g. %%var%%).

Код WPSEO_Replace_Vars::has_been_registered() Yoast 19.7.1

public function has_been_registered( $replacement_variable ) {
	$replacement_variable = self::remove_var_delimiter( $replacement_variable );

	return isset( self::$external_replacements[ $replacement_variable ] );