Tribe__Tickets__Attendees::get_report_link( WP_Post $post )
Returns the full URL to the attendees report page.
Contents
Parameters
- $post
-
(WP_Post) (Required)
Return
(string)
Source
File: src/Tribe/Attendees.php
public function get_report_link( $post ) {
$args = array(
'post_type' => $post->post_type,
'page' => $this->slug(),
'event_id' => $post->ID,
);
// Remove the post type from the admin URL as ?post_type=post is the same as edit.php and is not required for posts.
if ( 'post' === $post->post_type ) {
unset( $args['post_type'] );
}
$url = add_query_arg( $args, admin_url( 'edit.php' ) );
/**
* Filter the Attendee Report Url
*
* @since TDB
*
* @param string $url a url to attendee report
* @param int $post ->ID post id
*/
$url = apply_filters( 'tribe_ticket_filter_attendee_report_link', $url, $post->ID );
return $url;
}
Changelog
| Version | Description |
|---|---|
| 5.6.4 | - tec_tickets_filter_event_id filter to normalize the $post_id. |
| 4.6.2 | Introduced. |