before_last_bar

SummerySummery

Remove last item on a pipe-delimited string.

Syntax

before_last_bar( string $string )

DescriptionDescription

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.

ParametersParameters

$string

(string) (Required) A pipe-delimited string.

ReturnReturn

(string) Either $string or everything before the last pipe.

SourceSource

File: wp-includes/l10n.php


			

ChangelogChangelog

Changelog
Version Description
2.8.0 Introduced.
Scroll to Top