ACF

Updater::get_plugin_bypublicACF 5.7.2

Returns a registered plugin for the give key and value.

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

Хуков нет.

Возвращает

Массив|false.

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

$Updater = new Updater();
$Updater->get_plugin_by( $key, $value );
$key(строка)
The array key to compare.
По умолчанию: ''
$value(строка)
The value to compare against.
По умолчанию: null

Список изменений

С версии 5.7.2 Введена.

Код Updater::get_plugin_by() ACF 6.4.2

public function get_plugin_by( $key = '', $value = null ) {
	foreach ( $this->plugins as $plugin ) {
		if ( $plugin[ $key ] === $value ) {
			return $plugin;
		}
	}
	return false;
}