bp_email_get_template( WP_Post $object )
Get the paths to possible templates for the specified email object.
Description Description
Parameters Parameters
- $object
-
(Required) Post to get email template for.
Return Return
(array)
Source Source
File: bp-core/bp-core-functions.php
function bp_email_get_template( WP_Post $object ) { $single = "single-{$object->post_type}"; /** * Filter the possible template paths for the specified email object. * * @since 2.5.0 * * @param array $value Array of possible template paths. * @param WP_Post $object WP_Post object. */ return apply_filters( 'bp_email_get_template', array( "assets/emails/{$single}-{$object->post_name}.php", "{$single}-{$object->post_name}.php", "{$single}.php", "assets/emails/{$single}.php", ), $object ); }
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |