Changeset 54938 for trunk/src/wp-includes/l10n.php
- Timestamp:
- 12/06/2022 01:01:16 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/l10n.php
r54891 r54938 223 223 * @since 2.8.0 224 224 * 225 * @param string $ stringA pipe-delimited string.226 * @return string Either $ stringor everything before the last pipe.227 */ 228 function before_last_bar( $ string) {229 $last_bar = strrpos( $ string, '|' );225 * @param string $text A pipe-delimited string. 226 * @return string Either $text or everything before the last pipe. 227 */ 228 function before_last_bar( $text ) { 229 $last_bar = strrpos( $text, '|' ); 230 230 if ( false === $last_bar ) { 231 return $ string;231 return $text; 232 232 } else { 233 return substr( $ string, 0, $last_bar );233 return substr( $text, 0, $last_bar ); 234 234 } 235 235 }
Note: See TracChangeset
for help on using the changeset viewer.