BP_Messages_Message::strip_leading_and( string $s )
Strips the leading AND and any surrounding whitespace from a string.
Description
Used here to normalize SQL fragments generated by WP_Meta_Query
and other utility classes.
Parameters
- $s
-
(Required) String.
Return
(string)
Source
File: bp-messages/classes/class-bp-messages-message.php
protected static function strip_leading_and( $s ) { return preg_replace( '/^\s*AND\s*/', '', $s ); }
Changelog
Version | Description |
---|---|
BuddyPress 2.7.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.