You are here

function _cmf_get_img in Content Management Filter 7

Same name and namespace in other branches
  1. 5 cmf.module \_cmf_get_img()
  2. 6.2 cmf.module \_cmf_get_img()
  3. 6 cmf.module \_cmf_get_img()

Get the html code of an image

Parameters

the pretended image:

Return value

html tag img

4 calls to _cmf_get_img()
cmf_admin_both_form in ./both.inc
Defines the form for mixed content administration filter results.
cmf_admin_comments_form in ./comment.inc
Defines the form for comments administration filter results.
cmf_admin_nodes_form in ./node.inc
Defines the form for nodes administration filter results.
theme_cmf_user in ./cmf.module
Theme user cell on table result.

File

./cmf.module, line 965
@brief Content management filter module file

Code

function _cmf_get_img($action, $title) {
  $path = base_path() . drupal_get_path('module', 'cmf') . '/images/' . $action . '.png';
  if ($title == NULL) {
    $html = '<img src="' . $path . '" alt="untitled image" />';
  }
  else {
    $html = '<img src="' . $path . '" title="' . $title . '" alt="' . $title . '" />';
  }
  return $html;
}