I'd like to know if it is possible for me to manipulate the output of wp_head()?
Right now I'm using the Yoast SEO plugin to add some social tags into my posts (og:*).
Now this site is an remake of an older umbraco based blog, and the permalink structure is different, so the old urls are 301 to the new ones, but addthis requires the old url to keep the right count, so we have a custom field that provides the "addthis:url" when required... Unfortunately facebook & twitter do not use that url, but they use the pages "og:url" meta tag, that the plugin provides (which points to the new url), and seems that it can not be manipulated in the post.
My idea is that before the wp_head is printed out, I would basically do an search-and-replace to change that "og:url" to correct one, but I have not found a way to do that...
So what I'm asking is that is my idea correct and how to do it, or is there a better/official way to fix this solution?