Nodewords: how do I use hook_metatags_default_values_alter? I posted this question a week ago on the nodewords issue queue, but have had no reply and I'm stumped.

I want to programatically set the default value for a couple of tags, but the code comments for hook_metatags_default_values_alter read like hieroglyphics to me. An example would allow me to understand clearly. If I want to set the og:latitude tag to the value 43.701536, what should the call look like?

Thanks!
Without ever having used that hook, I would suppose that you could do it very similar to the example in the documentation for hook_metatags_default_value_alter():

function hook_metatags_default_values_alter(&amp;$values, $parameters) {
  if ($parameters['phase'] == 'post_load' &amp;&amp; $parameters['type'] == NODEWORDS_TYPE_USER) {
    $values['og:latitude'] = 43.701536;
  }
}


For a better understanding it might be worth the effort to dig through the code of _nodewords_tag_value which seems to have the only invocation of the hook. You can see there, that it is invoked twice with a different $phase parameter. I think I would go for post_load, assuming that the defaults are not empty.

For the type parameter, you can see the available constants in the nodewords.module doc under constants. This value depends on where you want to alter the tag.

If the above code doesn't work, use dpm or something similar to inspect the $values that are passed in. That should give you enough information concerning the expected data.