This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WP_Compat::plugin_folder( string $path )

Get plugin folder name from a path.


Parameters

$path

(Required)


Return

(string)


Source

File: wp-includes/classicpress/class-wp-compat.php

	private static function plugin_folder( $path ) {
		return preg_replace( '~^' . preg_quote( WP_PLUGIN_DIR ) . preg_quote( DIRECTORY_SEPARATOR ) . '([^' . preg_quote( DIRECTORY_SEPARATOR ) . ']*).*~', '$1', $path );
	}