diff --git a/nodewords.module b/nodewords.module index 4cf678b..7d15cae 100644 --- a/nodewords.module +++ b/nodewords.module @@ -192,6 +192,7 @@ function nodewords_form_node_type_form_alter(&$form, &$form_state) { $options = array(); if (function_exists($function)) { + $options['parameters'] = isset($info['callback arguments']) ? $info['callback arguments'] : array(); $function($form, 'node_type_form', $options); } } @@ -523,6 +524,7 @@ function nodewords_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { ); if ($bool) { + $tag_options['parameters'] = isset($info['callback arguments']) ? $info['callback arguments'] : array(); $function( $output_tags, isset($node->nodewords[$name]) ? $node->nodewords[$name] : array(), @@ -557,7 +559,7 @@ function nodewords_preprocess_page(&$variables) { if (defined('MAINTENANCE_MODE')) { return; } - + $options = _nodewords_detect_type_and_id(); $output_tags = array(); @@ -575,6 +577,7 @@ function nodewords_preprocess_page(&$variables) { ); if ($bool) { + $options['parameters'] = isset($info['callback arguments']) ? $info['callback arguments'] : array(); $function($output_tags, array(), $options); } } @@ -596,6 +599,7 @@ function nodewords_preprocess_page(&$variables) { // Prepare the tags. foreach (nodewords_get_possible_tags() as $name => $info) { if (function_exists($function = $info['callback'] . '_prepare')) { + $options['parameters'] = isset($info['callback arguments']) ? $info['callback arguments'] : array(); $function($output_tags, isset($tags[$name]) ? $tags[$name] : array(), $options); } } @@ -819,6 +823,7 @@ function nodewords_form($type, $tags, $options = array()) { if ($bool) { if (function_exists($function = $info['callback'] . '_form')) { + $tag_options['parameters'] = isset($info['callback arguments']) ? $info['callback arguments'] : array(); $function($form, isset($tags[$name]) ? $tags[$name] : array(), $tag_options); } } @@ -1442,7 +1447,7 @@ function _nodewords_output_tags($tags, $output_type = 'head') { isset($tags_info[$name]['templates']['head'][$name]) && $tags_info[$name]['templates']['head'][$name] == NODEWORDS_META_PROPERTY ); - $parts = $is_property ? array($name, $name) : explode(':', $name); + $parts = $is_property ? array($name, $name) : explode(':', $name); // Ensure that the previous assigned output template was cleared. $template = NULL;