Skip to main content

[yoko_facetwp_check_all]

Grouped "check all" controller for multiple FacetWP checkbox facets.

Syntax

[yoko_facetwp_check_all facets="facet_one,facet_two,facet_three" label="Check All" class="optional-class"]

Attributes

AttributeTypeDefaultDescription
facetsstring""Comma-separated list of FacetWP facet names to toggle. Non-checkbox facets are ignored.
labelstringCheck AllText shown for the master checkbox control.
classstring""Additional CSS class names added to the shortcode wrapper.

Behavior

  • Works with FacetWP checkbox UI facets only.
  • Uses FacetWP-compatible classes for visual continuity.
  • Updates master and target checkboxes immediately in the UI.
  • Synchronizes FacetWP state by updating FWP.facets and then calling:
    • FWP.fetchData()
    • FWP.setHash()

Accessibility

  • Uses role="checkbox" for the master control.
  • Updates aria-checked with true, false, or mixed.
  • Supports keyboard activation via Enter and Space.

Example

[yoko_facetwp_check_all facets="find_a_specialist_fhrs,find_a_specialist_ibhre_ccds,find_a_specialist_ibhre_ceps" label="Check All"]