{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/122","repository_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp","labels_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/122/comments","events_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/122/events","html_url":"https://github.com/Automattic/facebook-instant-articles-wp/issues/122","id":147967989,"number":122,"title":"Is there a filter we can use to update the post \"content\"?","user":{"login":"samichamoun","id":9649880,"avatar_url":"https://avatars.githubusercontent.com/u/9649880?v=3","gravatar_id":"","url":"https://api.github.com/users/samichamoun","html_url":"https://github.com/samichamoun","followers_url":"https://api.github.com/users/samichamoun/followers","following_url":"https://api.github.com/users/samichamoun/following{/other_user}","gists_url":"https://api.github.com/users/samichamoun/gists{/gist_id}","starred_url":"https://api.github.com/users/samichamoun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samichamoun/subscriptions","organizations_url":"https://api.github.com/users/samichamoun/orgs","repos_url":"https://api.github.com/users/samichamoun/repos","events_url":"https://api.github.com/users/samichamoun/events{/privacy}","received_events_url":"https://api.github.com/users/samichamoun/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-04-13T07:16:35Z","updated_at":"2016-04-14T01:25:12Z","closed_at":null,"body":"I'm trying to run some regular expressions over the post content to make a couple of custom updates to the HTML. One of the reasons for this is to correctly wrap the <figure class=\"op-interactive\"> around our HTML5 videos.\r\n\r\nUnfortunately it isn't viable for us to manually add this around each video tag, as the embed code is generated automatically from a third party, and asking writers to start adding HTML manually is not an easy task ;)\r\n\r\nI have been trying to add_filter( 'instant_articles_content', 'myFunction' ) however this filter is defined in a protected function and does not appear to be doing anything.\r\n\r\nI'd also like to use this to scan through our HTML and remove some unnecessary components in posts.\r\n\r\nLet me know if I'm looking in the wrong area?"},"comment":{"url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/comments/209713977","html_url":"https://github.com/Automattic/facebook-instant-articles-wp/issues/122#issuecomment-209713977","issue_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/122","id":209713977,"user":{"login":"samichamoun","id":9649880,"avatar_url":"https://avatars.githubusercontent.com/u/9649880?v=3","gravatar_id":"","url":"https://api.github.com/users/samichamoun","html_url":"https://github.com/samichamoun","followers_url":"https://api.github.com/users/samichamoun/followers","following_url":"https://api.github.com/users/samichamoun/following{/other_user}","gists_url":"https://api.github.com/users/samichamoun/gists{/gist_id}","starred_url":"https://api.github.com/users/samichamoun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samichamoun/subscriptions","organizations_url":"https://api.github.com/users/samichamoun/orgs","repos_url":"https://api.github.com/users/samichamoun/repos","events_url":"https://api.github.com/users/samichamoun/events{/privacy}","received_events_url":"https://api.github.com/users/samichamoun/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T01:25:12Z","updated_at":"2016-04-14T01:25:12Z","body":"No luck.\r\n\r\nTo ensure that my code is actually running, I tried using the the_content\" filter. I can confirm this is being updated. (e.g. $content . \"helloworld\"). Unfortunately this means it manipulates what displays on the website too.\r\n\r\nI'm still not having any luck calling this instant_articles_content filter from the functions.php file. I'm not sure where else to call it from?"}}