inkthemes_optionsframework_uploader_function

-----------------------------------------------------------------------------------.

Description

inkthemes_optionsframework_uploader_function( $id, $std, $mod ); 

Parameters (3)

0. $id
The id.
1. $std
The std.
2. $mod
The mod.

Usage

  1. if ( !function_exists( 'inkthemes_optionsframework_uploader_function' ) ) { 
  2. require_once '/functions/admin-interface.php'; 
  3.  
  4. // The id. 
  5. $id = null; 
  6.  
  7. // The std. 
  8. $std = null; 
  9.  
  10. // The mod. 
  11. $mod = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = inkthemes_optionsframework_uploader_function($id, $std, $mod); 
  15.  

Defined (1)

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

/functions/admin-interface.php  
  1. function inkthemes_optionsframework_uploader_function($id, $std, $mod) { 
  2. //$uploader .= '<input type="file" id="attachement_'.$id.'" name="attachement_'.$id.'" class="upload_input"></input>'; 
  3. //$uploader .= '<span class="submit"><input name="save" type="submit" value="Upload" class="button upload_save" /></span>'; 
  4.  
  5. $uploader = ''; 
  6. $upload = inkthemes_get_option($id); 
  7.  
  8. if ($mod != 'min') { 
  9. $val = $std; 
  10. if (inkthemes_get_option($id) != "") { 
  11. $val = inkthemes_get_option($id); 
  12. $uploader .= '<input class=\'of-input\' name=\'' . $id . '\' id=\'' . $id . '_upload\' type=\'text\' value=\'' . str_replace("'", "", $val) . '\' />'; 
  13.  
  14. $uploader .= '<div class="upload_button_div"><span class="button image_upload_button" id="' . $id . '">Upload Image</span>'; 
  15.  
  16. if (!empty($upload)) { 
  17. $hide = ''; 
  18. } else { 
  19. $hide = 'hide'; 
  20.  
  21. $uploader .= '<span class="button image_reset_button ' . $hide . '" id="reset_' . $id . '" title="' . $id . '">Remove</span>'; 
  22. $uploader .='</div>' . "\n"; 
  23. $uploader .= '<div class="clear"></div>' . "\n"; 
  24. $findme = 'wp-content/uploads'; 
  25. $imgvideocheck = strpos($upload, $findme); 
  26. if ((!empty($upload)) && ($imgvideocheck === true)) { 
  27. $uploader .= '<a class="of-uploaded-image" href="' . $upload . '">'; 
  28. $uploader .= '<img class="of-option-image" id="image_' . $id . '" src="' . $upload . '" alt="" />'; 
  29. $uploader .= '</a>'; 
  30. $uploader .= '<div class="clear"></div>' . "\n"; 
  31. return $uploader;