Wordpress php file_get_contents(html file) -> the_content...Cloud 9 login mark up injected into my content!?!?

html
php
wordpress

#1

I am seeing some issues I have never seen before with wordpress plugin development, and I think it may be a Cloud 9 issue.

Developing a custom wordpress plugin which will be used as a angular SPA. In the plugin I attempt to add a filter for ‘the_content’ for which I add custom content via an html file on the fs.

add_filter('the_content','add_my_content');
function add_my_content($content){
    $content = file_get_contents(plugins_url( '/html/mycontent.html', __FILE__ ) )
    return $content;
}

html contents
<div id="test-container"><div id="test-sub-container"></div></div>

what I end up seeing on the page is a bunch of Cloud 9 injected markup (seemingly a segment that is used for the login form) that throws a bunch of jquery errors? to be clear I have never had an issue with this type of approach of loading markup content into a wp page before.


#2

Can you see what does this expression plugins_url( '/html/mycontent.html', __FILE__ ) evaluate to? Just wanto make sure if you indeed have a file at that location.