Exporting a content pane into code.

Public

Get raw version
php
  1. <?php
  2.  
  3. #mymodule.ctools_content.inc.
  4.  
  5.  
  6. function mymodule_default_ctools_custom_content() {
  7. $export = array();
  8.  
  9. // Exported
  10. $content = new stdClass();
  11. $content->disabled = FALSE;
  12. $content->api_version = 1;
  13. $content->name = 'custom_content_pane';
  14. $content->admin_title = 'Custom Content Pane';
  15. $content->admin_description = 'This appears within the admin interface for the pane.';
  16. $content->category = 'category';
  17. $content->settings = array(
  18. 'admin_title' => $content->admin_title, // Add the admin title to the settings array so that it appears in the pane form.
  19. 'title' => 'Pane title',
  20. 'body' => '<div>This is my custom pane</div>
  21. ',
  22. 'format' => 'full_html',
  23. 'substitute' => 1,
  24. );
  25. // Exported
  26. $export[$content->name] = $content; // Add the pane to the $export array
  27.  
  28. return $export;
  29. }