bb_install_header

The BuddyPress bb install header function.

Description

bb_install_header( (string) $title = '', (constant) $header = false, (bool) $logo = false ); 

Parameters (3)

0. $title — Optional. (string) => ''
The title.
1. $header — Optional. (constant) => false
The header.
2. $logo — Optional. (bool) => false
The logo.

Usage

  1. if ( !function_exists( 'bb_install_header' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-core.php'; 
  3.  
  4. // The title. 
  5. $title = ''; 
  6.  
  7. // The header. 
  8. $header = false; 
  9.  
  10. // The logo. 
  11. $logo = false; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bb_install_header($title, $header, $logo); 
  15.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-core.php  
  1. function bb_install_header( $title = '', $header = false, $logo = false ) 
  2. if ( empty($title) ) 
  3. if ( function_exists('__') ) 
  4. $title = __('bbPress'); 
  5. else 
  6. $title = 'bbPress'; 
  7.  
  8. $uri = false; 
  9. if ( function_exists('bb_get_uri') && !BB_INSTALLING ) { 
  10. $uri = bb_get_uri(); 
  11. $uri_stylesheet = bb_get_uri('bb-admin/install.css', null, BB_URI_CONTEXT_LINK_STYLESHEET_HREF + BB_URI_CONTEXT_BB_INSTALLER); 
  12. $uri_stylesheet_rtl = bb_get_uri('bb-admin/install-rtl.css', null, BB_URI_CONTEXT_LINK_STYLESHEET_HREF + BB_URI_CONTEXT_BB_INSTALLER); 
  13. $uri_logo = bb_get_uri('bb-admin/images/bbpress-logo.png', null, BB_URI_CONTEXT_IMG_SRC + BB_URI_CONTEXT_BB_INSTALLER); 
  14.  
  15. if (!$uri) { 
  16. $uri = preg_replace('|(/bb-admin)?/[^/]+?$|', '/', $_SERVER['PHP_SELF']); 
  17. $uri_stylesheet = $uri . 'bb-admin/install.css'; 
  18. $uri_stylesheet_rtl = $uri . 'bb-admin/install-rtl.css'; 
  19. $uri_logo = $uri . 'bb-admin/images/bbpress-logo.png'; 
  20.  
  21. header('Content-Type: text/html; charset=utf-8'); 
  22. ?> 
  23. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  24. <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( function_exists( 'bb_language_attributes' ) ) bb_language_attributes(); ?>> 
  25. <head> 
  26. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  27. <title><?php echo $title; ?></title> 
  28. <meta name="robots" content="noindex, nofollow" /> 
  29. <link rel="stylesheet" href="<?php echo $uri_stylesheet; ?>" type="text/css" /> 
  30. <?php 
  31. if ( function_exists( 'bb_get_option' ) && 'rtl' == bb_get_option( 'text_direction' ) ) { 
  32. ?> 
  33. <link rel="stylesheet" href="<?php echo $uri_stylesheet_rtl; ?>" type="text/css" /> 
  34. <?php 
  35. ?> 
  36. </head> 
  37. <body> 
  38. <div id="container"> 
  39. <?php 
  40. if ( $logo ) { 
  41. ?> 
  42. <div class="logo"> 
  43. <img src="<?php echo $uri_logo; ?>" alt="bbPress" /> 
  44. </div> 
  45. <?php 
  46.  
  47. if ( !empty($header) ) { 
  48. ?> 
  49. <h1> 
  50. <?php echo $header; ?> 
  51. </h1> 
  52. <?php