Function Reference: geodir_buddypress_action_post_type
Summary
Checks post type has archive and returns the post type if true.
Package
GeoDirectory_BuddyPress_Integration
Return Values
- (int|string)
Change Log
Since: 1.0.0
Source File
geodir_buddypress_action_post_type() is located in geodir_buddypress/includes/gdbuddypress_functions.php [Line: 866]
Source Code
function geodir_buddypress_action_post_type() { $action = bp_current_action(); $gd_post_types = geodir_get_posttypes( 'array' ); $post_type = ''; foreach ( $gd_post_types as $gd_post_type => $post_info ) { if ( $post_info['has_archive'] == $action ) { $post_type = $gd_post_type; break; } } return $post_type; }