Description


This hook is triggered before loading template for package. If you want to add/edit before loading template file, you can use this hook.

Parameters


One argument is passed to this hook.

Usage


To change template data.
<?php add_filter('wdm_before_fetch_template','my_fetch_template',10,1); ?>

Examples

<?php
add_filter('wdm_before_fetch_template','my_fetch_template',10,1);
function my_fetch_template($vars){
//your code here
$vars['tag-name'] = "tag value";
$vars['new_tag'] = callback_function();
return $vars;
}
?>

Now you can use [tag-name] in your link or page template which will show the “tag value” at front-end.

Related


Last Updated: May 20, 2016


Leave a Reply