get_skinscreenshot

The BuddyPress cover get skinscreenshot function.

Description

get_skinscreenshot( $file ); 

Parameters (1)

0. $file
The file.

Usage

  1. if ( !function_exists( 'get_skinscreenshot' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-cover/bp-cover-admin.php'; 
  3.  
  4. // The file. 
  5. $file = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_skinscreenshot($file); 
  9.  

Defined (1)

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

/bp-cover-admin.php  
  1. function get_skinscreenshot($file) { 
  2. $exts = array("png", "jpg", "gif"); 
  3. foreach($exts as $ext) { 
  4. if(file_exists(BP_COVER_TEMPLATES_DIR."$file/screenshot.$ext")) { 
  5. $image = BP_COVER_TEMPLATES_URL."$file/screenshot.$ext"; 
  6. return "<img src='$image' width='280' height='230'>"; 
  7. return "<img src='".BP_COVER_TEMPLATES_URL."default.gif' width='280' height='230'>";