You are here

function assets_get_content in Asset 7

Page callback to get html for asset preview in wysiwyg.

1 string reference to 'assets_get_content'
asset_menu in ./asset.module
Implements hook_menu().

File

includes/asset.admin.inc, line 532
Asset admin page callbacks.

Code

function assets_get_content() {
  $content = '';
  if (isset($_REQUEST['tag']) && !empty($_REQUEST['tag'])) {
    $tag = $_REQUEST['tag'];
    $matches = assets_filter_get_matches($tag);
    if (!empty($matches)) {
      $match = reset($matches);
      $asset = asset_load($match[2]);
      $content .= assets_render_by_tag($asset, $match[3], TRUE);
    }
  }
  print $content;
  drupal_exit();
}