get_attachment_template
get_attachment_template ( No parameters )
See:Returns:- (string) Full path to attachment template file.
Defined at:Change Log: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Retrieves path of attachment template in current or parent template.The hierarchy for this template looks like:
1. {mime_type}-{sub_type}.php
2. {sub_type}.php
3. {mime_type}.php
4. attachment.php
An example of this is:
1. image-jpeg.php
2. jpeg.php
3. image.php
4. attachment.php
The template hierarchy and template path are filterable via the {@see '$type_template_hierarchy'}
and {@see '$type_template'} dynamic hooks, where `$type` is 'attachment'.