BP_Groups_Group::get_slug( int $group_id )

Get the slug for a given group ID.


Parameters Parameters

$group_id

(int) (Required) ID of the group.


Top ↑

Return Return

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


Source Source

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

	public static function get_slug( $group_id ) {
		global $wpdb;

		$bp = buddypress();

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


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.