Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/17/2017 06:57:32 PM (9 years ago)
Author:
dcavins
Message:

Introduce groups_get_id_by_previous_slug().

Introduce groups_get_id_by_previous_slug() function to find groups
that once had the requested slug.

See #6014.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-functions.php

    r11555 r11558  
    476476function groups_get_id( $group_slug ) {
    477477        return BP_Groups_Group::group_exists( $group_slug );
     478}
     479
     480/**
     481 * Get a group ID by checking against old (not currently active) slugs.
     482 *
     483 * @since 2.9.0
     484 *
     485 * @param string $group_slug The group's slug.
     486 * @return int|null The group ID on success; null on failure.
     487 */
     488function groups_get_id_by_previous_slug( $group_slug ) {
     489        return BP_Groups_Group::get_id_by_previous_slug( $group_slug );
    478490}
    479491
Note: See TracChangeset for help on using the changeset viewer.