WC_Install::associate_plugin_file
Get slug from path and associate it with the path.
Метод класса: WC_Install{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = WC_Install::associate_plugin_file( $plugins, $key );
- $plugins(массив) (обязательный)
- Associative array of plugin files to paths.
- $key(строка) (обязательный)
- Plugin relative path. Example: woocommerce/woocommerce.php.
Код WC_Install::associate_plugin_file() WC Install::associate plugin file WC 10.4.3
private static function associate_plugin_file( $plugins, $key ) {
$path = explode( '/', $key );
$filename = end( $path );
$plugins[ $filename ] = $key;
return $plugins;
}