Summery Summery
Remove last item on a pipe-delimited string.
Syntax Syntax
Description Description
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.
Parameters Parameters
- $string
-
(Required) A pipe-delimited string.
Return Return
(string) Either $string or everything before the last pipe.
Source Source
File: wp-includes/l10n.php
*/ $translation = apply_filters( "gettext_{$domain}", $translation, $text, $domain ); return $translation; } /** * Remove last item on a pipe-delimited string.
Advertisement
Changelog Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |