Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenhornet79/78920374486b35030ab0f08c913d70ed to your computer and use it in GitHub Desktop.
Save greenhornet79/78920374486b35030ab0f08c913d70ed to your computer and use it in GitHub Desktop.
<?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