Skip to content

Instantly share code, notes, and snippets.

@miteshmap
Created April 15, 2014 17:19
Show Gist options
  • Select an option

  • Save miteshmap/10749380 to your computer and use it in GitHub Desktop.

Select an option

Save miteshmap/10749380 to your computer and use it in GitHub Desktop.
Update path for multiligual node
<?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