You are here

function panels_admin_content_custom_php in Panels 6.2

Same name and namespace in other branches
  1. 5.2 content_types/custom_php.inc \panels_admin_content_custom_php()

Render callback for when the custom content is in the editor so that people can have a preview on the spot.

Parameters

panels_display $display:

stdClass $pane:

Return value

stdClass $block

1 string reference to 'panels_admin_content_custom_php'
panels_custom_php_panels_content_types in content_types/custom_php.inc
Callback function to supply a list of content types.

File

content_types/custom_php.inc, line 61

Code

function panels_admin_content_custom_php($display, $pane) {
  $block = new stdClass();
  $block->title = filter_xss_admin($pane->configuration['title']);

  // We don't want to render php output on preview here, because if something is
  // wrong the whole display will be borked.
  $block->content = check_markup($pane->configuration['body'], 1);
  return $block;
}