benecaster_guest_manager_guests_output
Filters the HTML of the benecaster_guests shortcode: the guest list, its search form and page links. The list itself is filtered first by benecaster_guest_manager_guest_directory_data.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$html |
string |
— | The list's HTML |
$directory |
array |
— | The list it was drawn from: `search`, `page`, `pages`, `total`, `guests`, `previous_url`, `next_url`, `form` |
$atts |
array |
— | The shortcode's attributes after defaults: `title`, `search`, `per_page` |
Returns:
string
Example
// Say how many guests there are under the list.
add_filter( 'benecaster_guest_manager_guests_output', function ( string $html, array $directory, array $atts ): string {
return $html . sprintf( '<p class="my-total">%d guests</p>', (int) $directory['total'] );
}, 10, 3 );
Notes
The returned HTML is printed as is: escape anything you add. Walkthrough: Place guests anywhere with Guest Manager's shortcodes.
Affects
- [benecaster_guests] shortcode
Need this built rather than just documented? See our services →