public function getShortcodeModules($post_id) : array
    {
        $post = get_post($post_id);
        $pattern = get_shortcode_regex();
        $modules = array();

        if (is_object($post) && preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches)
            && array_key_exists(2, $matches)
            && in_array('modularity', $matches[2])) {

            $shortcodes = preg_replace('/[^0-9]/', '', $matches[3]);
            foreach ($shortcodes as $key => $shortcode) {
                $modules[] = array(
                    'ID' => $shortcode,
                    'post_type' => get_post_type($shortcode)
                );
            }
        }

        return $modules;
    }