Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The project page states, "This module has an extra hook in case you want to try to do a little extra cleanup to make a specific node type work." I have read the README and looked through the code itself, but I still can't figure out what this "extra cleanup" hook is or how to call it. What am I missing?
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1256478-7.clone-api.d7.patch | 3.75 KB | dww |
#7 | 1256478-7.clone-api.d6.patch | 3.48 KB | dww |
#1 | 1256478.patch | 791 bytes | ldweeks |
Comments
Comment #1
ldweeks CreditAttribution: ldweeks commentedFound it. Here's a patch for some documentation for the next guy.
Comment #2
Jax CreditAttribution: Jax commentedIn the 7.x version the signature is different:
drupal_alter('clone_node', $node, $context);
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedIdeally this is documented in a new api.node_clone.inc file for D7.
Comment #4
RobLoachclone.api.php
Comment #5
johnvJust for reference: there is also some text in clone.pages.inc.
Comment #6
johnvComment #7
dwwI was just using node_clone for a project and wanted to know if it invoked any hooks. Didn't see clone.api.php. Grepped the code. Found the alter hooks, and wrote my own API docs to contribute. Was about to submit a new issue but searched first and found this. ;) Here are patches for both D6 and D7, ready for
git am
goodness.Cheers,
-Derek
Comment #8
johnvThis is nice - it took me a long time before mastering the hook_alter, although it is mentioned in the docu.
Perhaps you can add the following switch + simplification in the example:
Comment #9
pwolanin CreditAttribution: pwolanin commentedThanks dww!
do we really need to remove the inline docs, or you just think that will get stale?
Comment #10
dwwSure! :) Just seems pointless to duplicate them in multiple places where people aren't going to look. [module].api.php is the ubiquitous standard now, so if we've got that, we're set.
Cheers,
-Derek
Comment #11
pwolanin CreditAttribution: pwolanin commentedcommitted to 6 and 7