apply_filters( "ld_template_args_{$name}", array|null $args, string $filepath, bool|null $echo )
Filters template arguments.
Description #
The dynamic part of the hook refers to the name of the template.
Parameters #
- $args
-
(array|null) Template data.
- $filepath
-
(string) Template file path.
- $echo
-
(bool|null) Whether to echo the template output or not.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for ld_template_args_{$name} filter.
*/
add_filter(
'ld_template_args_course',
function( $args, $filepath, $echo ) {
// May add any custom logic using $args, $filepath, $echo.
// Always return $args.
return $args;
},
10,
3
);