This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Checks the URL for the debug parameter | |
// example.com/event/event-name/?tribe_query_debug=true | |
function tribe_events_pre_get_posts_dumper ($query) { | |
$show_debug_info = isset($_GET['tribe_query_debug']) ? $_GET['tribe_query_debug'] : false; | |
if(($show_debug_info == "true" && $query->is_main_query() === true) || $show_debug_info == "full") { | |
echo "<h3><Tribe Events Query></h3>"; | |
tribe_spit_it_out($query); |