groupblog_redirect_group_home

Groupblog_redirect_group_home().

Description

groupblog_redirect_group_home(); 

Redirect Group Home page to Blog Home page if set in admin settings.


Usage

  1. if ( !function_exists( 'groupblog_redirect_group_home' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-groupblog/bp-groupblog.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = groupblog_redirect_group_home(); 
  7.  

Defined (1)

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

/bp-groupblog.php  
  1. function groupblog_redirect_group_home() { 
  2. global $bp; 
  3.  
  4. if ( bp_is_group_home() ) { 
  5.  
  6. $checks = get_site_option('bp_groupblog_blog_defaults_options'); 
  7.  
  8. $blog_id = get_groupblog_blog_id(); 
  9.  
  10. if ( $checks['deep_group_integration'] && ! empty( $blog_id ) ) { 
  11. $home_url = get_home_url( $blog_id ); 
  12. bp_core_redirect( $home_url );