Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'tribe_get_template_part_content', 'modify_filterbar_output', 10, 5 );
- /**
- * We'll use some string manipulation to tweak filter bar output.
- *
- * Subsequent releases of Filter Bar may contain additional hooks that allow a finer
- * grained approach to this problem.
- *
- * @param $html
- * @param $template
- * @param $file
- * @param $slug
- * @param $name
- * @return string
- */
- function modify_filterbar_output( $html, $template, $file, $slug, $name ) {
- // Only interfere if this relates to the horizontal filter bar
- // (you can change appropriately if you are interested in the vertical form)
- if ( 'filter-bar/filter-view-horizontal' !== $slug ) return $html;
- // In this case we want to eliminate the "all day" entry in the time filter
- // (you could similarly adapt this to remove different elements)
- $eliminate = '<li><label><input type="checkbox" value="allday" name="tribe_timeofday[]" /><span title="All Day">All Day</span></label></li>';
- return str_replace( $eliminate, '', $html );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement