-
Notifications
You must be signed in to change notification settings - Fork 37
CSS Classes for Conditional Visibility
Mostafa Soufi edited this page Mar 1, 2025
·
3 revisions
WP Statistics uses specific CSS classes to control the visibility of elements based on certain conditions.
-
js-wps-show_if_{id}_enabled- Purpose: Makes an element visible if the feature with the given ID is enabled.
-
Example:
.js-wps-show_if_tracking_enabledwill show the element if the "tracking" feature is enabled.
-
js-wps-show_if_{id}_equal_{value}- Purpose: Makes an element visible if the feature’s value matches the given value.
-
Example:
.js-wps-show_if_privacy_mode_equal_enabledwill show the element if the "privacy_mode" setting isenabled.
These classes are added dynamically by JavaScript to control element visibility based on settings and feature statuses.