Importing_Route::get_endpoint()publicYoast 1.0

Gets the right endpoint for the given arguments.

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

Хуков нет.


Строку|false. The endpoint for the given action or false on failure of finding the one.


$Importing_Route = new Importing_Route();
$Importing_Route->get_endpoint( $plugin, $type );
$plugin(строка) (обязательный)
The plugin to import from.
$type(строка) (обязательный)
The type of entity to import.

Код Importing_Route::get_endpoint() Yoast 22.1

public function get_endpoint( $plugin, $type ) {
	if ( empty( $plugin ) || empty( $type ) ) {
		return false;

	return Main::API_V1_NAMESPACE . "/import/{$plugin}/{$type}";