bp_refresh_member_types_cache( int $post_id, post $post, bool $update )
Build the cache for the bp_active_member_types post types.
Description
Parameters
- $post_id
-
(Required) The post ID.
- $post
-
(Required) The post object.
- $update
-
(Required) Whether this is an existing member type being updated or not.
Source
File: bp-members/bp-members-functions.php
3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 | function bp_refresh_member_types_cache( $post_id , $post , $update ) { /* * In production code, $slug should be set only once in the plugin, * preferably as a class property, rather than in each function that needs it. */ $post_type = get_post_type( $post_id ); // If this isn't a 'member_type' post, don't update it. if ( bp_get_member_type_post_type() !== $post_type ) return ; // Force the cache refresh for active_member_types posts. bp_get_active_member_types( $force_refresh = true ); } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.1.4 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.