bp_is_component_front_page

  • apply_filters( 'bp_is_component_front_page', ( $bp->pages->{$component}->id == get_option( 'page_on_front' ) ), $component )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-template.php :: Trac Source Line: 959
      	if ( !$component && !empty( $bp->current_component ) )
      		$component = $bp->current_component;
      
      	$path = is_main_site() ? bp_core_get_site_path() : $current_blog->path;
      
      	if ( 'page' != get_option( 'show_on_front' ) || !$component || empty( $bp->pages->{$component} ) || $_SERVER['REQUEST_URI'] != $path )
      		return false;
      
      	return apply_filters( 'bp_is_component_front_page', ( $bp->pages->{$component}->id == get_option( 'page_on_front' ) ), $component );
      }
      
      /**
       * Is this a blog page, ie a non-BP page?
       *
       * You can tell if a page is displaying BP content by whether the current_component has been defined
       *
       * @package BuddyPress
       *
       * @return bool True if it's a non-BP page, false otherwise
      

Comments are closed.