/ facet / html
Dit filter wordt eerder aangeroepen om een facet weer te geven bij renderen of vernieuwen.
Het laat toe om de output van facetten te wijzigen.
Argument | Type | Omschrijving |
$html | draad | Facet HTML-opmaak |
$facet_id | geheel getal | Facet-ID |
[pastacode lang=”php” manual=”function%20prefix_facet_html(%20%24html%2C%20%24facet_id%20)%20%7B%0A%0A%09%2F%2F%20If%20it%20matches%20facet%20id%201%2C%20we%20replace%20string%20in%20facet%20HTML.%20%0A%09if%20(%201%20%3D%3D%3D%20%24facet_id%20)%20%7B%20%24html%20%3D%20str_replace(%20’Facet%20string’%2C%20’Another%20string’%2C%20%24html%20)%3B%0A%0A%09%7D%0A%0A%09return%20%24html%3B%0A%0A%7D%0A%0Aadd_filter(%20’wp_grid_builder%2Ffacet%2Fhtml’%2C%20’prefix_facet_html’%2C%2010%2C%202%20)%3B” message=”” highlight=”” provider=”manual”/]