#8 - remove call get_the_content($snippet_post->ID) and replace with $content = $snippet_post->post_content to prevent notices in admin screen.