BP_Groups_Group::check_slug( string $slug )

Check for the existence of a slug.

Description

Parameters

$slug

(string) (Required) Slug to check.

Return

(string|null) The slug, if found. Otherwise null.

Source

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

	public static function check_slug( $slug ) {
		global $wpdb;

		$bp = buddypress();

		return $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM {$bp->groups->table_name} WHERE slug = %s", $slug ) );
	}

Changelog

Changelog
Version Description
BuddyPress 1.6.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.