WC_Install::associate_plugin_file() – Get slug from path and associate it with the path.

You appear to be a bot. Output may be restricted

Description

Get slug from path and associate it with the path.

Usage

WC_Install::associate_plugin_file( $plugins, $key );

Parameters

$plugins
( array ) required – Associative array of plugin files to paths.
$key
( string ) required – Plugin relative path. Example: woocommerce/woocommerce.php.

Returns

void

Source

File name: woocommerce/includes/class-wc-install.php
Lines:

1 to 6 of 6
  private static function associate_plugin_file( $plugins, $key ) {
    $path                 = explode( '/', $key );
    $filename             = end( $path );
    $plugins[ $filename ] = $key;
    return $plugins;
  }
 

 View on GitHub View on Trac