Tribe__Tickets__Tickets_View::intercept_content( string $content = '' )
Intercepts the_content from the posts to include the orders structure.
Contents
Parameters
- $content
-
(string) (Optional) Normally the_content of a post.
Default value: ''
Return
(string)
Source
File: src/Tribe/Tickets_View.php
public function intercept_content( $content = '' ) {
// Prevents firing more then it needs too outside of the loop
$in_the_loop = isset( $GLOBALS['wp_query']->in_the_loop ) && $GLOBALS['wp_query']->in_the_loop;
// Prevents Weird
if ( ! $this->is_edit_page() || ! $in_the_loop ) {
return $content;
}
ob_start();
include Tribe__Tickets__Templates::get_template_hierarchy( 'tickets/orders.php' );
$content = ob_get_clean();
return $content;
}
Changelog
| Version | Description |
|---|---|
| 4.11.2 | Introduced. |