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-group.php

    r12430 r12731  
    17471747        $tax_query = new WP_Tax_Query( array(
    17481748            array(
    1749                 'taxonomy' => 'bp_group_type',
     1749                'taxonomy' => bp_get_group_type_tax_name(),
    17501750                'field'    => 'name',
    17511751                'operator' => $operator,
     
    17541754        ) );
    17551755
    1756         $site_id  = bp_get_taxonomy_term_site_id( 'bp_group_type' );
     1756        $site_id  = bp_get_taxonomy_term_site_id( bp_get_group_type_tax_name() );
    17571757        $switched = false;
    17581758        if ( $site_id !== get_current_blog_id() ) {
Note: See TracChangeset for help on using the changeset viewer.