Created
April 7, 2021 17:47
-
-
Save greenhornet79/78920374486b35030ab0f08c913d70ed to your computer and use it in GitHub Desktop.
This file contains 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 | |
add_filter('body_class', 'zeen101_add_lp_level_to_body'); | |
function zeen101_add_lp_level_to_body($classes) | |
{ | |
$level_ids = leaky_paywall_subscriber_current_level_ids(); | |
if (!$level_ids) { | |
return $classes; | |
} | |
$level_id = array_shift($level_ids); | |
$classes[] = 'lp-level-id-' . $level_id; | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment