bp_core_strip_number_from_slug( string $path )
Remove number from the dir
Description
Parameters
- $path
-
(Required)
Return
(string) $path
Source
File: bp-core/bp-core-help.php
*/
function bp_core_strip_number_from_slug( $path ) {
$new_path = '';
foreach ( explode( '/', $path ) as $current_path ) {
$current_path = db_core_remove_file_extension_from_slug( $current_path );
$current_path = db_core_remove_file_number_from_slug( $current_path );
$new_path .= empty( $new_path ) ? $current_path : '/' . $current_path;
}
return $new_path;
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.