page_slogan.inc 795 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * Plugin to handle the 'page_slogan' content type which allows the
  5. * slogan of the site to be embedded into a panel.
  6. */
  7. /**
  8. * Plugins are described by creating a $plugin array which will be used
  9. * by the system that includes this file.
  10. */
  11. $plugin = array(
  12. 'title' => t('Site slogan'),
  13. 'single' => TRUE,
  14. 'icon' => 'icon_page.png',
  15. 'description' => t("Add the site's slogan as content."),
  16. 'category' => t('Page elements'),
  17. 'render last' => TRUE,
  18. );
  19. /**
  20. * Output function for the 'page_slogan' content type.
  21. *
  22. * Outputs the slogan for the current page.
  23. */
  24. function ctools_page_slogan_content_type_render($subtype, $conf, $panel_args) {
  25. $block = new stdClass();
  26. $block->content = filter_xss_admin(variable_get('site_slogan', ''));
  27. return $block;
  28. }