before_last_bar
before_last_bar ( $text )
Parameters:- (string) text A pipe-delimited string.
Returns:- (string) Either $text or everything before the last pipe.
Defined at: - Introduced in WordPress: 2.8.0
- Deprecated in WordPress: —
Description
Removes last item on a pipe-delimited string.Meant for removing the last item in a string, such as 'Role name|User role'. The original
string will be returned if no pipe '|' characters are found in the string.