Tribe__Events__Editor__Template__Overwrite::silence( string $file )
Silence the actual templating and lets use an action to prevent Old Stuff to have any sort of interactions with what we are constructing here.
Contents
Parameters
- $file
-
(string) (Required) Which file would be loaded
Return
(string)
Source
File: src/Tribe/Editor/Template/Overwrite.php
public function silence( $file ) {
$post_id = get_the_ID();
// Prevent overwrite for posts that doens't have Blocks
if ( ! has_blocks( $post_id ) ) {
return $file;
}
return $this->get_path( 'silence' );
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |