apply_filters( 'learndash_template', string $filepath, string $name, array $args, boolean $echo, boolean $return_file_path )
Filters file path for the learndash template being called.
Description #
Parameters #
- $filepath
-
(string) Template file path.
- $name
-
(string) Template name.
- $args
-
(array) Template data.
- $echo
-
(boolean) Whether to echo the template output or not.
- $return_file_path
-
(boolean) Whether to return file or path or not.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for learndash_template filter. */ add_filter( 'learndash_template', function( $filepath, $name, $args, $echo, $return_file_path ) { // May add any custom logic using $filepath, $name, $args, $echo, $return_file_path. // Always return $filepath. return $filepath; }, 10, 5 );
Changelog #
Version | Description |
---|---|
3.0.3 | - Allow override of empty or other checks. |
2.1.0 | Introduced. |