public function initScheduler($postId) : bool
    {
        $active = true;
        $post_types = get_field('content_scheduler_posttypes', 'option');

        if (is_array($post_types) && !empty($post_types)) {
            $current = get_post_type($postId);
            $active = in_array($current, $post_types);
        }

        return $active;
    }
public function initScheduler($postId) : bool
    {
        $active = true;
        $post_types = get_field('content_scheduler_posttypes', 'option');

        if (is_array($post_types) && !empty($post_types)) {
            $current = get_post_type($postId);
            $active = in_array($current, $post_types);
        }

        return $active;
    }
public function initScheduler ( $ postId ) : bool { $ active = true ; $ post_types = get_field ( 'content_scheduler_posttypes' , 'option' ) ; if ( is_array ( $ post_types ) && ! empty ( $ post_types ) ) { $ current = get_post_type ( $ postId ) ; $ active = in_array ( $ current , $ post_types ) ; } return $ active ; }
Check if current post type is activated in settings
@param  int|string $postId Current post id
@return bool
Check if current post type is activated in settings