Yoast\WP\SEO\Services\Importing

Importable_Detector_Service::filter_actions()publicYoast 1.0

Filters all import actions from a list that do not match the given Plugin or Type.

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

Хуков нет.

Возвращает

Массив.

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

$Importable_Detector_Service = new Importable_Detector_Service();
$Importable_Detector_Service->filter_actions( $all_actions, $plugin, $type );
$all_actions(Importing_Action_Interface[]) (обязательный)
The complete list of actions.
$plugin(строка|null)
The Plugin name whose actions to keep.
По умолчанию: null
$type(строка|null)
The type of actions to keep.
По умолчанию: null

Код Importable_Detector_Service::filter_actions() Yoast 22.4

public function filter_actions( $all_actions, $plugin = null, $type = null ) {
	return \array_filter(
		$all_actions,
		static function ( $action ) use ( $plugin, $type ) {
			return $action->is_compatible_with( $plugin, $type );
		}
	);
}