• Resolved Dan Stramer

    (@danstramer)


    Hello,

    Once upgrading to PHP 8, we encountered a fatal error because of using this function:

    add_filter( 'post_class', 'um_add_restricted_class_css', 10, 1 );

    function um_add_restricted_class_css($classes){
    global $post;
    $restriction = get_post_meta( $post->ID, 'um_content_restriction', true );

    // if the post is restricted do this.
    if ( $restriction['_um_accessible'] == 2 ){
    $classes[] = 'um-restricted-content';
    }

    return $classes;
    }

    Can you please advise?

    Thank you,

    Dan

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.