public function slug(string $basename): string
    {
        if (($slug = mb_strstr($basename, '/', true))) {
            return $slug; // Got what we need here.
        } elseif (($slug = mb_strstr($basename, '.php', true))) {
            return $slug; // Got what we need here.
        }
        return ''; // Failed on `[slug]/plugin.php` & `[slug].php`.
    }
public function slug(string $basename): string
    {
        if (($slug = mb_strstr($basename, '/', true))) {
            return $slug; // Got what we need here.
        } elseif (($slug = mb_strstr($basename, '.php', true))) {
            return $slug; // Got what we need here.
        }
        return ''; // Failed on `[slug]/plugin.php` & `[slug].php`.
    }
public function slug ( string $ basename ) : string { if ( ( $ slug = mb_strstr ( $ basename , '/' , true ) ) ) { return $ slug ; // Got what we need here. } elseif ( ( $ slug = mb_strstr ( $ basename , '.php' , true ) ) ) { return $ slug ; // Got what we need here. } return '' ; // Failed on `[slug]/plugin.php` & `[slug].php`. }
Plugin slug from basename.

@since 160524 First documented version.

@param string $basename Plugin basename.

@return string Plugin slug or an empty string.
Plugin slug from basename .