You are here

function footnotes_views_handler_field_body_footnotes::render_name in Footnotes 6.2

Same name and namespace in other branches
  1. 7.3 footnotes_views_handler_field_body_footnotes.inc \footnotes_views_handler_field_body_footnotes::render_name()
  2. 7.2 footnotes_views_handler_field_body_footnotes.inc \footnotes_views_handler_field_body_footnotes::render_name()
1 call to footnotes_views_handler_field_body_footnotes::render_name()
footnotes_views_handler_field_body_footnotes::render in ./footnotes_views_handler_field_body_footnotes.inc

File

./footnotes_views_handler_field_body_footnotes.inc, line 13
Views handler for the body footnotes.

Class

footnotes_views_handler_field_body_footnotes
@file Views handler for the body footnotes.

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) {

    // $data = substr($data, $start, $end);
    $data = substr($data, $start);
  }
  else {

    // There are no footnotes.
    $data = '';
  }
  return $data;
}