inkthemes_optionsframework_uploader_function
-----------------------------------------------------------------------------------.
Description
Parameters (3)
- 0. $id
- The id.
- 1. $std
- The std.
- 2. $mod
- The mod.
Usage
if ( !function_exists( 'inkthemes_optionsframework_uploader_function' ) ) { require_once '/functions/admin-interface.php'; } // The id. $id = null; // The std. $std = null; // The mod. $mod = null; // NOTICE! Understand what this does before running. $result = inkthemes_optionsframework_uploader_function($id, $std, $mod);
Defined (1)
The function is defined in the following location(s).
- /functions/admin-interface.php
- function inkthemes_optionsframework_uploader_function($id, $std, $mod) {
- //$uploader .= '<input type="file" id="attachement_'.$id.'" name="attachement_'.$id.'" class="upload_input"></input>';
- //$uploader .= '<span class="submit"><input name="save" type="submit" value="Upload" class="button upload_save" /></span>';
- $uploader = '';
- $upload = inkthemes_get_option($id);
- if ($mod != 'min') {
- $val = $std;
- if (inkthemes_get_option($id) != "") {
- $val = inkthemes_get_option($id);
- }
- $uploader .= '<input class=\'of-input\' name=\'' . $id . '\' id=\'' . $id . '_upload\' type=\'text\' value=\'' . str_replace("'", "", $val) . '\' />';
- }
- $uploader .= '<div class="upload_button_div"><span class="button image_upload_button" id="' . $id . '">Upload Image</span>';
- if (!empty($upload)) {
- $hide = '';
- } else {
- $hide = 'hide';
- }
- $uploader .= '<span class="button image_reset_button ' . $hide . '" id="reset_' . $id . '" title="' . $id . '">Remove</span>';
- $uploader .='</div>' . "\n";
- $uploader .= '<div class="clear"></div>' . "\n";
- $findme = 'wp-content/uploads';
- $imgvideocheck = strpos($upload, $findme);
- if ((!empty($upload)) && ($imgvideocheck === true)) {
- $uploader .= '<a class="of-uploaded-image" href="' . $upload . '">';
- $uploader .= '<img class="of-option-image" id="image_' . $id . '" src="' . $upload . '" alt="" />';
- $uploader .= '</a>';
- }
- $uploader .= '<div class="clear"></div>' . "\n";
- return $uploader;
- }