You are here

function footnotes_views_handler_field_body_content::render_name in Footnotes 7.2

Same name and namespace in other branches
  1. 6.2 footnotes_views_handler_field_body_content.inc \footnotes_views_handler_field_body_content::render_name()
  2. 7.3 footnotes_views_handler_field_body_content.inc \footnotes_views_handler_field_body_content::render_name()
1 call to footnotes_views_handler_field_body_content::render_name()
footnotes_views_handler_field_body_content::render in ./footnotes_views_handler_field_body_content.inc
Render the field.

File

./footnotes_views_handler_field_body_content.inc, line 13
Views handler for the body content.

Class

footnotes_views_handler_field_body_content
@file Views handler for the body content.

Code

function render_name($data, $values) {
  $start = strpos($data, '<ul class="footnotes">');

  // By default footnotes are at the end, but they could be anywhere really.
  // $end   = strpos($data, '</ul><!-- end footnotes -->')+strlen('</ul><!-- end footnotes -->');
  if ($start !== FALSE) {
    $result = substr($data, 0, $start);

    // if ($end !== FALSE) {
    //   $result .= substr($data, $end);
    // }
    $data = $result;
  }
  return $data;
}