before_last_bar


before_last_bar ( $string )

Parameters:
  • (string) $string A pipe-delimited string.
Returns:
  • (string) Either $string or everything before the last pipe.
Defined at:

Description

Remove 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.

Related Functions

timer_start, the_author_lastname, force_ssl_admin, rest_url, register_sidebar

Top Google Results

User discussions

wpseek mobile