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
$textstring
A pipe-delimited string.
Return
string
Either $text or everything before the last pipe.
Used by · 4
_c()Retrieve translated string with vertical bar context
_nc()Legacy version of _n(), which supports contexts.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/l10n.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.