opengraph_meta_test_module.module in Open Graph meta tags 6
Same filename and directory in other branches
File
tests/opengraph_meta_test_module/opengraph_meta_test_module.moduleView source
<?php
/**
* Implements hook_og_tag_render_alter().
*/
function opengraph_meta_test_module_og_tag_render_alter() {
$args = func_get_args();
return call_user_func_array(array(
'OpenGraphMetaTestModule',
'hook_og_tag_render_alter',
), $args);
}
class OpenGraphMetaTestModule {
/** @var array result values for calls to hook_og_tag_render_alter. */
public static $og_tag_render_alter = array();
/**
* Implements hook_og_tag_render_alter().
*
* @param $node the node whose tag is being rendered.
* @param $name the name of the OG tag being rendered, e.g. title, image.
* @param $value the value of the OG tag being rendered.
*
* @return the altered value to render for the given tag.
*/
public static function hook_og_tag_render_alter($node, $name, $value) {
return !empty(self::$og_tag_render_alter[$name]) ? self::$og_tag_render_alter[$name] : $value;
}
}
Functions
Name | Description |
---|---|
opengraph_meta_test_module_og_tag_render_alter | Implements hook_og_tag_render_alter(). |
Classes
Name | Description |
---|---|
OpenGraphMetaTestModule |