benecaster_guest_manager_get_directory_mode()
benecaster_guest_manager_get_directory_mode(): string
Which public guest directory the podcaster chose on Benecaster → Guests → Public guest directory: Off, One combined directory or Combined, plus one for each show. Read the setting with this function, never the option. See Switch on, restyle or extend the public guest directory.
Return Value
Type:
string
off, combined (one public guest directory at /guests/) or per_show (/guests/ plus one at /{show prefix}/{show}/guests/ for each show with Guest Manager on). off when the setting was never chosen or was reset.
Example
$mode = function_exists( 'benecaster_guest_manager_get_directory_mode' )
? benecaster_guest_manager_get_directory_mode()
: 'off';
// Follow the page's show while each show has its own directory.
$atts = 'per_show' === $mode ? ' show="current"' : '';
echo do_shortcode( '[benecaster_guests' . $atts . ']' );
Notes
The setting as stored. It answers the same while Guest Manager is off on every show, when no directory
is drawn at all. It is defined on every request while Guest Manager is active; guard calls with
function_exists(), since Guest Manager may not be installed.
Need this built rather than just documented? See our services →