You are here

function img_assist_set_htmlcode in Image Assist 6

Same name and namespace in other branches
  1. 5.3 img_assist.module \img_assist_set_htmlcode()
  2. 5 img_assist.module \img_assist_set_htmlcode()
  3. 5.2 img_assist.module \img_assist_set_htmlcode()
  4. 6.2 img_assist.module \img_assist_set_htmlcode()

Store image tag or HTML in session.

Used for saving HTML code so it can be inserted instead of the filter tags.

Parameters

string $htmlcode: A filter tag or HTML code. If omitted, session variable is emptied.

Return value

string A previously stored value in the user session.

Related topics

2 calls to img_assist_set_htmlcode()
img_assist_insert_html_form in ./img_assist.module
img_assist_properties_form_validate in ./img_assist.module

File

./img_assist.module, line 1050
Image Assist module

Code

function img_assist_set_htmlcode($htmlcode = NULL) {
  if (isset($htmlcode)) {
    $_SESSION['htmlcode'] = urlencode($htmlcode);
  }
  else {
    $html = urldecode($_SESSION['htmlcode']);
    $_SESSION['htmlcode'] = '';
    return $html;
  }
}