p2_background_image

The BP Groupblog p2 background image function.

Description

p2_background_image(); 

Usage

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

Defined (1)

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

/themes/p2/functions.php  
  1. function p2_background_image() { 
  2. $p2_background_image = get_option( 'p2_background_image' ); 
  3.  
  4. if ( 'none' == $p2_background_image || '' == $p2_background_image ) 
  5. return false; 
  6.  
  7. ?> 
  8. <style type="text/css"> 
  9. body { 
  10. background-image: url( <?php echo get_template_directory_uri() . '/i/backgrounds/pattern-' . $p2_background_image . '.png' ?> ); 
  11. </style> 
  12. <?php