Created
April 15, 2014 17:19
-
-
Save miteshmap/10749380 to your computer and use it in GitHub Desktop.
Update path for multiligual node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function foo_update_path() { | |
| $nid = 1; | |
| $node = node_load($nid); | |
| foo_custom_module($node); | |
| exit; | |
| } | |
| function foo_custom_module($node) { | |
| module_load_include('inc', 'pathauto'); | |
| pathauto_create_alias('node', 'insert', 'node/'.$node->nid, array('node' => $node), $node->type, 'en'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment