Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Plugins are described by creating a $plugin array which will be used
- * by the system that includes this file.
- */
- $plugin = array(
- 'title' => t('Workbench Moderation Node History'),
- 'icon' => 'icon_node.png',
- 'description' => t('Node history'),
- 'required context' => new ctools_context_required(t('Node'), 'node'),
- 'category' => t('Workbench Moderation'),
- );
- /**
- * Render the custom content type.
- */
- function workbench_panels_workbench_moderation_node_history_content_type_render($subtype, $conf, $panel_args, $context) {
- if (empty($context) || empty($context->data)) {
- return;
- }
- // Get a shortcut to the node.
- $node = $context->data;
- // Build the content type block.
- module_load_include('inc', 'workbench_moderation', 'workbench_moderation.node');
- $block = new stdClass();
- $block->module = 'wm_node_history';
- $block->content = workbench_moderation_node_history_view($node);
- $block->delta = $node->nid;
- return $block;
- }
- /**
- * Returns an edit form for custom type settings.
- */
- function workbench_panels_workbench_moderation_node_history_content_type_edit_form($form, &$form_state) {
- return $form;
- }
- /**
- * Returns the administrative title for a type.
- */
- function workbench_panels_workbench_moderation_node_history_content_type_admin_title($subtype, $conf, $context) {
- return t('"@s" node history', array('@s' => $context->identifier));
- }
Advertisement
Add Comment
Please, Sign In to add comment