astra_get_template( string $template_name, array $args = array(), string $template_path = '', string $default_path = '' )
Deprecating astra_get_template function.
Description
Getting Astra Pro’s template.
See also
Parameters
- $template_name
-
(string) (Required) template path. E.g. (directory / template.php).
- $args
-
(array) (Optional) (default: array()).
Default value: array()
- $template_path
-
(string) (Optional) (default: '').
Default value: ''
- $default_path
-
(string) (Optional) (default: '').
Default value: ''
Return
(callback)
Source
File: classes/deprecated/deprecated-functions.php
function astra_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { $located = astra_locate_template( $template_name, $template_path, $default_path ); if ( ! file_exists( $located ) ) { /* translators: 1: file location */ _doing_it_wrong( __FUNCTION__, esc_html( sprintf( __( '%s does not exist.', 'astra-addon' ), '<code>' . $located . '</code>' ) ), '1.0.0' ); return; } // Allow 3rd party plugin filter template file from their plugin. $located = apply_filters( 'astra_addon_get_template', $located, $template_name, $args, $template_path, $default_path ); do_action( 'astra_addon_before_template_part', $template_name, $template_path, $located, $args ); include $located; do_action( 'astra_addon_after_template_part', $template_name, $template_path, $located, $args ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.6.2 | Introduced. |