Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
539 bytes

This adds drupal_alter('workbench_moderation_node_history_view', $rows);

xtfer’s picture

Status: Needs review » Reviewed & tested by the community

This is such a minor patch I can't see any issues with RTBC'ing it. Its "working" locally for me.

stevector’s picture

Status: Reviewed & tested by the community » Needs work

Interesting idea. Thanks for the patch.

A change like this would at least need an entry in workbench_moderation.api.php since it introduces a new hook. Can you give me an example of how you're using it?

DamienMcKenna’s picture

I'm trying to use it over in #1871552: Panelizer does not work well with workbench and entity revisions. to aid with integrating Workbench Moderation with Panelizer.

How does this patch work for you?

DamienMcKenna’s picture

Status: Needs work » Needs review
hass’s picture

Status: Needs review » Needs work
+++ b/workbench_moderation.api.phpundefined
@@ -66,3 +66,24 @@ function hook_workbench_moderation_states_next_alter(&$states, $current_state, $
+    if ($published) {
+      $row['data']['revision'] .= ' | ' . l('Panelizer', 'node/' . arg(1) . '/panelizer');
+    }
+    else {
+      $row['data']['revision'] .= ' | ' . l('Panelizer', 'node/' . arg(1) . '/revisions/' . $row['data']['vid'] . '/panelizer');
+    }

This example could be optimized. First add the links to an array and after the foreach(), execute an implode(' | ', $foo)

Looks good to go than.

DamienMcKenna’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
1.33 KB

I tidied up the hook_workbench_moderation_node_history_view_alter() example in the API file.

Status: Needs review » Needs work

The last submitted patch, 7: workbench_moderation-n1868144-7.patch, failed testing.

DamienMcKenna’s picture

Fixed a typoo, and added a comment above the drupal_alter() call.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
2.17 KB

Updated with more documentation for the hook and an improved example.

DamienMcKenna’s picture

Is this something the 1.x maintainers are interested in?