add_filter(\'get_public_descriptions\', \'theme_get_public_descriptions_filter\');
function theme_get_public_descriptions_filter ($context, $rule_uids)
{
$descriptions = array();
$rule_uids = (array) $rule_uids;
// Check if at least one rule uid is set
if (!empty($rule_uids) && is_array($rule_uids)) {
// Get rules by uids
$rules = RP_WCDPD_Rules::get($context, array(\'uids\' => $rule_uids), true);
// Iterate over applicable rules and append their public descriptions
foreach ($rules as $rule) {
if (isset($rule[\'public_note\']) && !RightPress_Helper::is_empty($rule[\'public_note\'])) {
$descriptions [$rule[\'uid\']]= $rule[\'public_note\'];
}
}
}
return !empty($descriptions) ? $descriptions : null;
}