BP_Groups_Group::check_slug( string $slug )

Check for the existence of a slug.


Description Description


Parameters Parameters

$slug

(Required) Slug to check.


Top ↑

Return Return

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


Top ↑

Source 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 ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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