BP_Groups_Group::strip_leading_and( string $s )

Strips the leading AND and any surrounding whitespace from a string.


Description Description

Used here to normalize SQL fragments generated by WP_Meta_Query and other utility classes.


Parameters Parameters

$s

(Required) String.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: bp-groups/classes/class-bp-groups-group.php

	protected static function strip_leading_and( $s ) {
		return preg_replace( '/^\s*AND\s*/', '', $s );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.