Yoast\WP\SEO\MyYoast_Client\User_Interface
Auth_Command::parse_scopes
Parses the comma-separated scopes option.
Метод класса: Auth_Command{}
Хуков нет.
Возвращает
string[]. The parsed scopes.
Использование
// private - только в коде основоного (родительского) класса $result = $this->parse_scopes( $assoc_args ): array;
- $assoc_args(array<string, string>|null) (обязательный)
- The associative arguments.
Код Auth_Command::parse_scopes() Auth Command::parse scopes Yoast 28.9
private function parse_scopes( $assoc_args ): array {
$scopes = Utils\get_flag_value( $assoc_args, 'scopes', '' );
if ( $scopes === '' ) {
return [];
}
return \array_values( \array_filter( \array_map( 'trim', \explode( ',', (string) $scopes ) ) ) );
}