Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/21/2020 01:36:43 AM (4 years ago)
Author:
imath
Message:

BP Types: add functions to generate the Group types WP Admin screens

  • Adds labels and arguments to the Group Type taxonomy.
  • Adds the Group type's Administration screens.
  • Introduces the bp_groups_register_group_type_taxonomy() function to register the Group type's taxonomy and stop doing it from the BP_Groups_Component::register_taxonomies() method.
  • Introduces the bp_get_group_type_metadata_schema() to add custom metadata for the Group type's taxonomy.
  • Introduces the bp_get_group_types_registered_by_code() to only get Group types registered by code.
  • Stops using the hardcoded bp_group_type identifier in favor of the filterable bp_get_group_type_tax_name() function.
  • Updates the test_groups_get_type_should_not_return_unregistered_types() unit test to test_groups_registered_by_code_group_type_should_not_return_unregistered_types() to check the previous point new function.

Props mercime, DJPaul, dcavins, boonebgorges

Fixes #7179

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-component.php

    r12607 r12731  
    925925     *
    926926     * @since 2.6.0
     927     * @since 7.0.0 The Group Type taxonomy is registered using the `bp_groups_register_group_type_taxonomy()` function.
    927928     */
    928929    public function register_taxonomies() {
    929         // Group Type.
    930         register_taxonomy( 'bp_group_type', 'bp_group', array(
    931             'public' => false,
    932         ) );
     930
     931        // Just let BP Component fire 'bp_groups_register_taxonomies'.
     932        return parent::register_taxonomies();
    933933    }
    934934
Note: See TracChangeset for help on using the changeset viewer.