evolve_bp_get_id

Function to use get buddypress page id.

Description

evolve_bp_get_id(); 

Usage

  1. if ( !function_exists( 'evolve_bp_get_id' ) ) { 
  2. require_once '/library/functions/basic-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = evolve_bp_get_id(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/library/functions/basic-functions.php  
  1. function evolve_bp_get_id() { 
  2. $post_id = ''; 
  3. $bp_page_id = get_option('bp-pages'); 
  4.  
  5. if (is_buddypress()) { 
  6. if (bp_is_current_component('members')) { 
  7. $post_id = $bp_page_id['members']; 
  8. } elseif (bp_is_current_component('activity')) { 
  9. $post_id = $bp_page_id['activity']; 
  10. } elseif (bp_is_current_component('groups')) { 
  11. $post_id = $bp_page_id['groups']; 
  12. } elseif (bp_is_current_component('register')) { 
  13. $post_id = $bp_page_id['register']; 
  14. } elseif (bp_is_current_component('activate')) { 
  15. $post_id = $bp_page_id['activate']; 
  16. } else { 
  17. $post_id = ''; 
  18.  
  19. return $post_id;